-
Notifications
You must be signed in to change notification settings - Fork 19
Layer Architecture
The Layer section handles stuff involving map layers.
It will expose the API Objects for use throughout the app. As discussed in the geoApi proposal, given the complexity of ESRI API Layer objects, we will not attempt to wrap or abstract them. They can lurk outside of geoApi. Objects exposed include (TODO add classes as we implement support for them)
- Feature Layer as FeatureLayer
- Dynamic Map Service Layer as ArcGISDynamicMapServiceLayer
- Graphics Layer as GraphicsLayer
- WMS Layer as WMSLayer
The conversion of alternate file formats (GeoJSON, CSV, Shapefile, TODO add other formats as they are supported) to FeatureLayer is also done here. The following libraries should be utilized to assist in the conversion.
- Terraformer - conversion of GeoJSON to ESRI JSON
- csv2geojson - converts CSV points to GeoJSON (surprising, I know!)
- Shapefile-js - converts Shapefiles to GeoJSON
We also provide a function that will link any provided event handlers to the Dojo on
events for ESRI layer objects. Events wrapped include load
, error
, update-start
, update-end
, click
, mouse-over
, mouse-out
. If it proves useful, we may add some extra event logic (e.g. a special loaded event that happens once after the first update-end event triggers). See the event handlers page for more details