I'm not sure that situation is so peculiar.  I believe the GeoCoder tries 
to return the "nearest" "valid" address. In Abdolhosein's example, the 
nearest address was across the border in Germany.  Using the bounding box 
(a very thoughtful work-around, thank you) results in an "approximate" 
location, 
but one that is closer to the specified lat-lng

I've come across a variant of this when geocoding known-good addresses very 
near to a County border.  The "official" County 
border is very twisty in order to assure that all of one City is in one 
County, but the GeoCoder uses a simplified version of 
the border.  As a result, addresses very close to the County border are 
sometimes GeoCoded into the wrong County.  I expect 
this could happen with Country borders too (but should be less likely).

- Jeff

On Thursday, August 9, 2012 11:57:11 PM UTC-7, Davide Cremonesi wrote:
>
> I think you found a very peculiar situation in which the shape of the 
> boundary is very different from a rectangle (bounding box) which I believe 
> is used to find matches.
> But if you also specify a parameter "bounds" with a box exactly matching 
> your point, you get the right result:
>
>
> http://maps.googleapis.com/maps/api/geocode/json?latlng=47.594819,7.679787&sensor=false&bounds=47.594819,7.679787|47.594819,7.679787
>  
>
> But note that in this way, without a bbox tolerance, you'll hardly find a 
> match on the street level!
>
> Cheers,
> Davide Cremonesi
>
> 2012/8/9 Abdolhosein V. Ebrahimi <[email protected] <javascript:>>
>
>> Hi
>>
>> There are some coordinates in google map on which reverse geocoding 
>> reports incorrect country name, but right clicking on very same location 
>> and selecting "What's here" will draw a color stroked on boundary of 
>> correct country, check example below :
>>
>> The selected point is in Switzerland, but first result in JSON is Germany:
>>
>>
>> http://maps.googleapis.com/maps/api/geocode/json?latlng=47.594819,7.679787&sensor=false
>>
>> Right clicking on very same point highlights Switzerland
>>
>> Thank you.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google Maps JavaScript API v3" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/google-maps-js-api-v3/-/R75SeTFfRiUJ.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/5RBjWwpHSmIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to