This plugin provides the ability to display and query ESRI REST services using the export feature and the identify feature. This treats the REST service as if it were a WMS service, as opposed to a normal tiled service.
The identify feature return a URL to a json file where a developer can use JSONP to extract information from an ArcGIS server.
- Description: Allows a developer to include an ESRI server in Leaflet using the ESRI REST API export function. It will also produce a URL based on a point that links to a JSON object returning information from the identify function.
- Usage: L.TileLayer.EsriRest(PATH_TO_SERVICE);
var wildfires = new L.TileLayer.EsriRest("https://wildfire.cr.usgs.gov/ArcGIS/rest/services/geomac_dyn/MapServer", {
layers: '1,18',
transparent: true
}).addTo(map);
- Usage: tileLayer.getIdentifyUrl(<L.Point>, {ESRI REST Identify Parameters});
var wildfireUrl = wildfires.getIdentifyUrl(clickedPoint, {showLayers: 'all'});
- Note: The showLayers parameter was added to allow the developer to select they type of query. The layers parameter was also modified to only accept layer numbers. (ex. layers: 0,1,2) For more information on the ESRI REST identify feature NOAA has a great page about it.
See ./examples/wildfires.html to see usage
- There is a similar project on github that provides ESRI tiled services as well as Bing and GeoJSON WFS. The project can be found at this link https://github.com/azgs/azgs-leaflet