Hi,
I am trying out the new Places service, and specifically trying to display place information on my basemap. https://jsapi.maps.arcgis.com/home/item.html?id=177e576ca3c94d5890dc3c790b29c1be I found that item which has exactly the data I'm looking for. I was excited to discover that Leaflet's vectorBasemapLayer allows passing an item ID, so I tried that: https://codepen.io/dandormont-the-decoder/pen/eYQXOyr
And it seems to load, but nothing displays and there are errors like "duplicate layer id "Religion place/Other Religion", previously used at line undefined
at Object.Tr [as emitValidationErrors"
How can I load a layer like this using esri-leaflet?
Thanks, Dan
Solved! Go to Solution.
the map style https://jsapi.maps.arcgis.com/home/item.html?id=177e576ca3c94d5890dc3c790b29c1be is currently in beta release for evaluation only, and not considered ready to production use. Maybe the issues will get resolved once it is in production.
Hm. I partly answered my own question by creating a copy of that style and editing it in the Vector Tile Style Editor. I went into the JSON and manually removed the duplicates. https://dawx3gjaixmoyunx.maps.arcgis.com/home/item.html?id=69b1cd50b88945f6aaa2ba2b29f3640d
If I use that item ID instead, the map does start to display but I have a newer and more mysterious error: "Unimplemented type: 3""
Well, I found a workaround but I wouldn't quite call it a solution. Some googling suggested that the "unimplemented type 3" error comes when mapbox/maplibre downloads a PBF that is incorrectly gzipped. So I looked into all the PBFs that were being fetched, and while there were no gzip issues, there was this curiousity:
which returns a JSON error "Requested font resource not available" which is obviously not a valid PBF. I'm not sure what that means but when I went back to the vector editor, I indeed found many references to "Arial Unicode MS Bold". By deleting all of these, and creating another copy of my style layer, I was finally able to get the map to load.
But I'm a little confused. Why doesn't that fontstack load? And why doesn't the Map Viewer / ArcGIS Javascript have the same problem?
the map style https://jsapi.maps.arcgis.com/home/item.html?id=177e576ca3c94d5890dc3c790b29c1be is currently in beta release for evaluation only, and not considered ready to production use. Maybe the issues will get resolved once it is in production.
That's fair. I was more just trying to understand how map styles are loaded by the different clients and why this fails in this particular way