Requesting a tile with curl works fine but when I try to add the tiles as a Leaflet layer, I get a CORS error (see below). Isn’t it the goal to integrate Mapillary data and visualization to other websites?
Access to fetch at 'https://tiles.mapillary.com/maps/vtp/mly1_computed_public/2/{z}/{x}/{y}?access_token=XXX' from origin 'XXX' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I am also experiencing this issue (same error message) when trying to access https://tiles.mapillary.com/maps/vtp/mly1_public/2/{z}/{x}/{y}?access_token=XXX
Thanks @nikola. I have not, because I am not using one of the Esri web-map viewer apps. The integration I am working on is with the VertiGIS Studio Web Viewer (VSW). VSW provides an alternative to Esri’s Web AppBuilder and Experience Builder for building ArcGIS webmap-based mapping applications.
I know we have built wrappers for other Experience Builder widgets to load them in VSW, but I’m not seeing an ExB widget for Mapillary.
Thanks again, @nikola. I looked at the code, and while there are some bits that will likely be helpful, the image markers on the mapbox map are hard-coded. My current plan is to retrieve these features using the Mapillary graph API, using the extent of the map as the bounding box. However, even better would be if I could simply add the https://tiles.mapillary.com/maps/vtp/mly1/ service to an arcgis webmap. I hope that makes sense.
Thanks @nikola. I did try adding that layer to an ArcGIS Web Map using the AGOL Map Viewer. In the DevTools network tab I can see all the requests for tiles, which appear to be correct and successful, however the layer is not drawing on the map. I see in the sample you linked the symbology is being provided, so perhaps that’s why. I’ll try adding the layer using the ArcGIS Javascript API, which provides more options. This is promising. Cheers!
Hi again, @nikola, out of curiousity, I installed the Mapillary add-on for ArcGIS Pro created a map with the Mapillary coverage layer, and published this out as a WebMap. Interestingly, this brings me full-circle, in that when opening the webmap in Map Viewer, all the requests for tiles are getting CORS errors.
Here is the JSON for the Mapillary coverage layer in the webmap:
Access to fetch at 'https://tiles.mapillary.com/maps/vtp/mly1_public/2/12/702/1635' from origin 'https://latitudegeo.maps.arcgis.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.Understand this errorAIdojo.js:64
GET https://tiles.mapillary.com/maps/vtp/mly1_public/2/12/702/1635 net::ERR_FAILED 403 (Forbidden)
We’ve updated the third-party tile API to always return * for the “access-control-allow-origin” header so this should hopefully fix the issue you’re facing. Please try them again and let us know.