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/h-
options.accessTokenString mapbox access token for using their API -
options.tileLayerObject Leaflet tilelayer, default is osm tiles -
options.imagePathString path to leaflet images -
options.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)Render the virtual-dom geojson data-field.
Parameters
-
hfunction virtual-domhfunction -
propertiesObject an options object, including any properties you can pass to leaflet & virtual-dom/h-
properties.displayBoolean true for display mode, default is false for input mode -
properties.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)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 build
npm install
npm test- data-fields – all data fields packaged together.
- data-ui – a collection of modules for managing data.