Esri / esri-leaflet-vector

Display ArcGIS Online vector basemaps w/ Esri Leaflet
Apache License 2.0
56 stars 57 forks source link

Sources other than 'esri' not supported when loading from item id #72

Closed jag-eagle-technology closed 3 years ago

jag-eagle-technology commented 3 years ago

The code within the utils.js function loadStyleFromItem, line 59 looks for the source named 'esri', but does not look for any other services (unless error is true). The World Contours service, id 51ca3ce6a16d4080ad955dacd6dd2fe2, only has the source name 'contours', and thus cannot be added as a vector tile layer by id.

jwasilgeo commented 3 years ago

@jag-eagle-technology, to be clear, you are reporting the following cases, correct?

Breaks: L.esri.Vector.vectorTileLayer("51ca3ce6a16d4080ad955dacd6dd2fe2").addTo(map);

Works: L.esri.Vector.vectorTileLayer("https://basemaps.arcgis.com/arcgis/rest/services/World_Contours_v2/VectorTileServer").addTo(map);

jag-eagle-technology commented 3 years ago

Yup, now that #71 is resolved

gavinr commented 3 years ago

This should be resolved in #91 - after the next release this should be fixed.

jwasilgeo commented 3 years ago

available on https://github.com/Esri/esri-leaflet-vector/releases/tag/v3.0.1