Strange behavior GoogleMap addon when using EXIF GPS coordinates

googlemaps.png

Today I managed to get to the root of a problem I have been trying to eliminate for some time now. It all has to do with the “use the EXIF coordinates” feature of the GoogleMap addon for Pixelpost. It seemed when using this feature the location magically shifted a few meters or even more.

When using reverse geocoding for latitude and longitude values Google Maps focuses on nearby (and sometimes not so near by) “points of interest” or the closest address it can find. This behavior can be changed by changing the following Javascript function function showLocationLatLng().

Change the code of that function to:
function showLocationLatLng() {
var latlng = new GLatLng(document.forms['view-latlng'].lat.value,document.forms['view-latlng'].lng.value);
editMap.addOverlay(new GMarker(latlng));
editMap.setCenter(latlng, 16);
}

This will force the addon to use the exact location of the image provided in the EXIF.