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

yam
  • 83
  • 6

1 Answers1

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.

IvanSanchez
  • 10,206
  • 2
  • 19
  • 35
  • 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 '19 at 08:25