0

I mark a point on Google maps and get lat, lon values. When I put those values in my code which uses Vue2leaflet and ESRI World Imagery tiles from https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}, the coordinates seem to differ by ~20 meters.

Are they using different projections and/or datums? As far as I can tell, both should be using EPSG:3857 so I can't tell the source of the problem.

The coordinates I get from google maps is (lat: 40.836566, lon: 29.514314)

Google maps:

enter image description here

Leaflet:

enter image description here

  • Try somewhere else. It might be that one of the image is not properly georeferenced – JGH Mar 28 at 17:00
  • This is a duplicate of EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet which is already answered. – Mouad Alami Mar 28 at 17:08
  • 1
    I don't think it's duplicate. The linked answer makes interesting points but doesn't explain why the two geographical coordinates don't match (or I'm missing something) – yam Mar 28 at 17:43
2

The aerial images are simply misaligned. This is not uncommon in rural areas, where the elevation data used for the orthorectification of the aerial images differs between sources.

This can be checked by loading both Google Maps (with a bit of help from GoogleMutant) and the ESRI aerial imagery in the same Leaflet map, and switching between the two with a L.Control.Layers, e.g.:

var map = new L.Map('leaflet');

var mutant = L.gridLayer.googleMutant({type: 'satellite'}).addTo(map);
var esriAerial = L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {
  maxZoom: 20, maxNativeZoom: 19
});

L.control.layers({google: mutant, esri: esriAerial}, {}, {collapsed: false}).addTo(map);

L.marker({lat: 40.836566, lon: 29.514314}).addTo(map);
map.setView({lat: 40.836566, lon: 29.514314}, 19);

See a working example here. Take a moment to go to another area and check the misaligment between both imagery sources: it will be different.

  • This really seems to be the source of the problem. Is there a mechanism to let ESRI (I think google's is the better aligned one) know of these misalignment areas so they can fix it in the future? – yam Mar 29 at 8:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.