You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 PROPERTYportalUrl: "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 publicapiKey: "...",token: "...",// optionally customize the style with a function that gets the default style from the service// and returns the new style to be usedstyle: (style)=>{returnnewStyle;}}).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:
Invalid Token error behind corporate firewall #68(Unknown, needs more info)The text was updated successfully, but these errors were encountered: