L.esri.Layers.TiledMapLayer
Inherits from L.TileLayer
Access tiles from ArcGIS Online and ArcGIS Server as well as visualize and identify features on them.
Is you have Feature Services published on ArcGIS online you can create a static set of tiles using your Feature Service. You can find details on that process on the ArcGIS Online Help
Your map service must be published using the Web Mercator Auxiliary Sphere tiling scheme (WKID 102100/3857) and the default scale option used by Google Maps, Bing Maps and ArcGIS Online. Esri Leaflet will not support any other spatial reference for tile layers.
Constructor
Constructor | Description |
---|---|
new L.esri.Layers.TiledMapLayer( L.esri.Layers.tiledMapLayer( new L.esri.TiledMapLayer( L.esri.tiledMapLayer( |
url should be the URL to the Map Service hosted the tiles. The options parameter can accept the same options as L.TileLayer |
Options
Option | Type | Default | Description |
---|---|---|---|
proxy |
String |
false |
URL of an ArcGIS API for JavaScript proxies or ArcGIS Resource Proxies to use for proxying POST requests. |
useCors |
Boolean |
true |
If this service should use CORS when making GET requests. |
L.esri.TiledMapLayer
also accepts all L.TileLayer
options.
Methods
Method | Returns | Description |
---|---|---|
authenticate(<String> token) |
this |
Authenticates this service with a new token and runs any pending requests that required a token. |
metadata(<Function> callback, <Object> context) |
this |
Requests metadata about this Feature Layer. Callback will be called with error and metadata .
|
identify() |
this |
Returns a new L.esri.services.IdentifyFeatures object that can be used to identify features on this layer. Your callback function will be passed a GeoJSON FeatureCollection with the results or an error.
|
L.esri.BasemapLayer
inherits all methods from L.TileLayer
.
Events
L.esri.TiledMapLayer
fires all L.TileLayer
events.
Example
var map = L.map('map').setView([37.7614, -122.3911], 12);
L.esri.tiledMapLayer("http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer", {
maxZoom: 15
}).addTo(map);
Esri Leaflet is a project from the Esri PDX R&D Center and the Esri Community