Add a portalUrl optional parameter to the L.esri.Vector.vectorTileLayer layer type, intended to be used with the "ITEM_ID" constructor flavor.
L.esri.Vector.vectorTileLayer("ITEM_ID", {
// ADD NEW OPTIONAL PROPERTY
portalUrl: "https://PATH/TO/ARCGIS/ENTERPRISE/",
// IF NOT PROVIDED, WILL DEFAULT TO SOME PART OF "https://www.arcgis.com/sharing/rest/content/items/"
// SHOULD BE SIMILAR IN NATURE TO https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl
// provide either apiKey or token if not public
apiKey: "...",
token: "...",
// optionally customize the style with a function that gets the default style from the service
// and returns the new style to be used
style: (style) => {
return newStyle;
}
}).addTo(map);
NOTE: The other layer type, L.esri.Vector.vectorBasemapLayer, will not support this enhancement as it 100% uses the the Esri Basemap Styles API internally.
Add a
portalUrl
optional parameter to theL.esri.Vector.vectorTileLayer
layer type, intended to be used with the "ITEM_ID" constructor flavor.Review internal
Util.js
usage here:NOTE: The other layer type,
L.esri.Vector.vectorBasemapLayer
, will not support this enhancement as it 100% uses the the Esri Basemap Styles API internally.Related issues:
28
80