L.esri.Vector.vectorBasemapLayer
Extends L.Layer
L.esri.Vector.vector
uses the esri-leaflet-vector
plugin to display Esri hosted vector basemaps—using the Esri Basemap Layer Service API—and attribute data providers appropriately.
Constructor
Note: There are two ways to construct this layer with the required key
parameter, either with a basemap style enum or an item ID of a custom basemap style.
Constructor | Description |
---|---|
L.esri.Vector.vectorBasemapLayer(<String> key, <Object> options) | key refers to either with a basemap style enum or an item ID of a custom basemap style that you'd like to add. Defaults to 'ArcGIS:Streets' . |
Vector Basemaps
Basemap style enums are formatted with two or three parts and can be used for the
key
constructor parameter:{Provider}:{Style name}
{Provider}:{Style name}:{Component}
Please refer to the complete list of default basemap styles.
Some samples include:
ArcGIS:
Dark Gray ArcGIS:
Imagery: Standard OSM:
Standard
Otherwise, if displaying a custom basemap style, the item ID of that custom basemap style is used for the
key
constructor parameter.
Options
L.esri.Vector.vector
also accepts all L.Layer
options.
Option | Type | 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. |
Methods
L.esri.Vector.vector
inherits all methods from L.Layer
.
Example
Live sample here.