Get exact longitude and latitude

0
For integration purposes, I need the exact longitude and latitude from Google Maps. When using the Google Maps module, the following longitude and latitude are returned on Mendix headquaters: Gedempte Zalmhaven 4K, 3011 Rotterdam Latitude : 51.91 Longitude: 4.48 This works to depict the address on the google map, but I need the exact coordinates. When having a look on Google Maps, the exact coordinates are Latitude: 51.910824, Longitude; 4.481190 Is there a way to get the exact coordinates?
asked
2 answers
1

Hi Thijs,

In the database, the exact coordinates are stored via calling the Java-action Location_GeoCode or something like that. I think you are now referring to the display value? The google maps module uses the exact coordinates, so with all digits, to plot the marker, not the display value of only two digits.

When double clicking on the textbox displaying the longitude attribute on the page in the Modeler, set under 'Formatting' the Decimal precision to higher than '2', then you will see that the stored value is more precise than 2 digits.

answered
1

The google maps module calls the Google API for geocoding via Java, so serverside, with as an inputparameter the whole address. If you go to GoogleMaps on the web the JavaScript (so clientside) API is being called and I think Google is doing some cleansing on the input address.

I tested what you said and got indeed the different results. The Google Maps module using the Java call, gives back a formatted address of 'Gedempte Zalmhaven, 3011 Rotterdam, Netherlands', so it picks the Geometric Center of the street Gedempte Zalmhaven. If you put that into Google Maps you see the marker appear on the same place as the Google Maps module is doing.

The only thing I can think of is that Google itself is doing some matching on addresses of Businesses it knows. It seems the number + suffix itself are not known to Google.

answered