Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional support for VTLs and styles hosted on ArcGIS Enterprise #88

Closed
jwasilgeo opened this issue May 20, 2021 · 2 comments · Fixed by #97
Closed

Additional support for VTLs and styles hosted on ArcGIS Enterprise #88

jwasilgeo opened this issue May 20, 2021 · 2 comments · Fixed by #97
Assignees

Comments

@jwasilgeo
Copy link
Contributor

jwasilgeo commented May 20, 2021

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);

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:

@jwasilgeo jwasilgeo self-assigned this Jul 20, 2021
@jwasilgeo

This comment has been minimized.

@jwasilgeo
Copy link
Contributor Author

This is available now in the recent v3.1.0 release. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant