I'm using ArcGIS' /export endpoint to get an .svg of a few map layers given a specific bounding box. However, when I apply the .svg as an image overlay to OpenStreetMap's world map using Leaflet, the overlay is scaled slightly too small.

I figured out that the mapScale parameter to the /export endpoint could be changed to alter the scale. However, there's no way for me to know what "scale value" my Leaflet map uses. As far as I can tell, Leaflet only knows about zoom levels and not "scale values".

Are there any resources for me to figure out how to find the proper scale value when exporting from ArcGIS?

Here's how I'm adding the svg layer:

var imglayer = 'layer.svg';
var imgbounds = [
L.imageOverlay(imglayer, imgbounds).addTo(mymap);
  • How do you include .svg in your map? That piece of code would help. – TomazicM Jan 20 at 10:45
  • @TomazicM, added some code – fglleo7 Jan 20 at 13:23
  • This seems OK. Scale value is not importamt in this case, just coordinates of the bounding box. Since you have projected values, they shoud come from the same crs as your map. From your code it is 3857. This should be crs you are using in ArcGIS and in Leaflet. – TomazicM Jan 20 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.