On Oct 13, 1:34 pm, john <[email protected]> wrote:
> Hi, there,
>
> Here is what I am doing now:
> Manually collect the bounds of the country (latNorth, lngEast,
> latSouth, lngWest) and save it in my country database. And with
> following (easy)
>
> var ne = new google.maps.LatLng(latNorth, lngEast);
> var sw = new google.maps.LatLng(latSouth, lngWest);
> var bounds = new google.maps.LatLngBounds(sw, ne);
>
> map.fitBounds(bounds);
>
> Now I want to show Russia. It's east end is actually belong to the
> other side of the world. So, my box can only extend east to 180, which
> is practically fine. I just curious if there a better way to do this.
>
> I saw a post (in v2) using GeoCoder but I failed to convert it to v3.
Below is what the geocoder returns for russia. What happens if you
use the coordinates from the "LatLonBox" for your bounds? (worked for
me...)
-- Larry
{
"id": "p1",
"address": "Russia",
"AddressDetails": {
"Accuracy": 1,
"Country": {
"CountryName": "Russia",
"CountryNameCode": "RU"
}
},
"ExtendedData": {
"LatLonBox": {
"north": 76.9609558,
"south": 31.2057644,
"east": 170.8851638,
"west": 39.7523482
}
},
"Point": {
"coordinates": [
105.318756,
61.52401,
0
]
}
}
>
> Thanks.
>
> John
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
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.