Esri/esri-leaflet-vector

Unable to load map with externally hosted tiles

Inurias opened this issue · 2 comments

Describe the bug

Sorry if this is intended behaviour, I've used leaflet a lot but I'm new to the whole Esri/ArcGIS environment and not familiar with the terminology. I read the documentation (https://developers.arcgis.com/esri-leaflet/api-reference/layers/vector-layer/) but I can't figure out how exactly I can load tiles that are hosted by external servers.

I'm trying to load: https://maps.wien.gv.at/basemapv/bmapv/3857/

Looking at the requests, the library is either attempting to load from ArcGIS servers (which I don't want) or from my specified base Url but with additional hardcoded path concatenations. This results in requests to: https://maps.wien.gv.at/sharing/rest/content/items/basemapv/bmapv/3857/?f=json, but that path doesn't exist on the server. I don't have control over the server and how it is hosted so moving the service to another path is not possible.

This issue looks like it might be related to what I'm looking for: #148

Reproduction

...
const layer = esriVector.vectorTileLayer('basemapv/bmapv/3857/', {
  portalUrl: 'https://maps.wien.gv.at'
});
this._map.addLayer(layer);

Logs

No response

System Info

Environment: Win 11, Angular with TypeScript

NPM packages:
"leaflet": "^1.9.3"
"esri-leaflet": "^3.0.10",
"esri-leaflet-vector": "^4.0.2"

Typings:
"@types/leaflet": "^1.9.3",
"@types/esri-leaflet": "^2.1.9"

Additional Information

No response

Hi, thanks for the question. Did you try referencing the URL directly like this:

L.esri.Vector.vectorTileLayer('https://maps.wien.gv.at/basemapv/bmapv/3857/').addTo(map);
stale commented

This issue has been automatically marked as stale because we're waiting on more information or details, but have not received any response. It will be closed if no further activity occurs. Thank you!