L.esri.Util
Utility methods used internally by Esri Leaflet. These methods are useful for converting data between ArcGIS and Leaflet formats.
Method | Returns | Description |
extentToBounds( |
LatLngBounds |
Converts ArcGIS Extent objects to Leaflet LatLngBounds objects. |
boundsToExtent( |
Extent |
Converts Leaflet LatLngBounds objects to ArcGIS Extent objects. |
arcgisToGeojson( arcgisToGeojson( |
GeoJSON |
Converts ArcGIS Geometry Objects or ArcGIS Feature Objects objects to GeoJSON. If you pass a GeoJSON Feature or FeatureCollection you should also pass idAttribute to assign a property from the feature attributes to the ID of the GeoJSON Feature, 'OBJECTID' or 'FID' attributes by default. |
geojsonToArcGIS(geojson idAttribute |
Object |
Converts GeoJSON objects to ArcGIS Geometry Objects or ArcGIS Feature Objects. If you pass a GeoJSON Feature or FeatureCollection you should also pass idAttribute to assign a property in the output features to represent the features id, 'OBJECTID' by default. |
responseToFeatureCollection(response idAttribute |
FeatureCollection |
Converts an API response (returned by identify, query or find API methods) to a GeoJSON FeatureCollection. This is used internally by L.esri.Tasks.Query , L.esri.Tasks.Identify and L.esri.Tasks.Find to convert responses. |
cleanUrl(url |
String |
Used internally to ensure that URLs have no leading or trailing whitespace and have a leading slash. |
Esri Leaflet is a project from the Esri PDX R&D Center and the Esri Community