user1388678
user1388678

Reputation: 11

reverse geocoding incorrect result

I have a little geocoding application http://www.galerie-insecte.org/galerie/ll3.php.

The principle is rather simple: one enters some data in the entry line above and the API gets the map and some data in the lower window (latitude, longitude, administrative address and altitude).

Now the problem: If I give a latlng in decimal format (43.588278,5.776472) or in DMS format (43°35'17.8",5°46'35.3"), I get a correct map (that is, the marker is correctly positionned [the user recognizes precisely the spot where he took the picture]). But the latitude and longitude data displayed is false (43.6044691,5.7687348).

More, moving the marker doesn't always change the data in the lower window. I could not find a clear sequence to reproduce the problem (changing to another magnification? changing to the satellite view? both of them together?)

Does it ring a bell for any of you?

Thanks in advance.

pduhem

Upvotes: 1

Views: 638

Answers (2)

user1388678
user1388678

Reputation: 11

Thanks, you're probably hitting the nail. I had to change my code. I now use the raw latlng returned by the geocoder.geocode (address...) call as such and I only display the street address got with geocoder.geocode (location...) call when I have the location_type ROOFTOP. If not, I only display the locality, postal code and country. For my web site (entomology portail) it's largely enough. And the latitude and longitude data displayed is now correct.

Upvotes: 0

Blazen
Blazen

Reputation: 322

Geocode service obtains the closest, human-readable address. So when you find the position of your tag from map using reverse geocode service it shows the latitude /longitude of that address only

Upvotes: 1

Related Questions