L.esri.Vector.vectorTileLayer
Extends L.Layer
L.esri.Vector.vector
uses the esri-leaflet-vector
plugin to display vector tile service layers and their styles published from user data.
Your vector tile service must be published using the Web Mercator Auxiliary Sphere tiling scheme (WKID 102100/3857) and the default scale options used by Google Maps, Bing Maps and ArcGIS Online. The
esri-leaflet-vector
plugin will not support any other spatial reference for vector tile layers because it relies directly upon maplibre-gl-js.
Constructor
Note: There are two ways to construct this layer with the required key
parameter, either with an item ID or service URL of a hosted vector tile layer.
Constructor | Description |
---|---|
L.esri.Vector.vectorTileLayer(<String> key, <Object> options) | key refers to the specific item ID or service URL of a hosted vector tile layer you'd like to add. |
Options
L.esri.Vector.vector
accepts all L.Layer
options.
Option | Type | Default | Description |
---|---|---|---|
apikey | String | If you pass an apikey in your options it will be included in all requests to the service. | |
token | String | If you pass a token in your options it will be included in all requests to the service. | |
portalUrl | String | 'https://www.arcgis.com' | Specify the ArcGIS Enterprise base URL if your layer is not hosted on ArcGIS Online. |
style | Function | Function that can be used to customize the style. It gets the default style from the service and returns the new style to be used. |
Methods
L.esri.Vector.vector
inherits all methods from L.Layer
.