data-field-geojson
v2.0.1
Published
## API
Downloads
6
Maintainers
Readme
data-field-geojson
API
createGeoJSONField
Create a virtual-dom geojson data-field for use with data-ui.
Parameters
optionsObject an options object, including any properties you can pass to leaflet & virtual-dom/hoptions.accessTokenString mapbox access token for using their APIoptions.tileLayerObject Leaflet tilelayer, default is osm tilesoptions.imagePathString path to leaflet imagesoptions.displayBoolean true for display mode, default is false for input mode
Examples
var createGeoJSONField = require('data-field-geojson')
var field = createGeoJSONField(options)
field.render(h, {}, geojsonObject)field.render
Render the virtual-dom geojson data-field.
Parameters
hfunction virtual-domhfunctionpropertiesObject an options object, including any properties you can pass to leaflet & virtual-dom/hproperties.displayBoolean true for display mode, default is false for input modeproperties.valueObject a geojson Feature or Featurecollection
valueObject a geojson Feature or Featurecollection
Examples
var createGeoJSONField = require('data-field-geojson')
var field = createGeoJSONField(options)
field.render(h, properties, geojsonObject)Installation
npm install data-field-geojson --saveOr install the data-fields module:
npm install data-fields --saveRight now this module relies on leaflet v1.0.0-beta2, and you must build the dependency manually:
cd node_modules/leaflet
npm install
npm run buildTests
npm install
npm testSee also
- data-fields – all data fields packaged together.
- data-ui – a collection of modules for managing data.
