V3 Map Language Selector?

201 views
Skip to first unread message

DezzyLee99

unread,
Jan 19, 2011, 4:01:04 PM1/19/11
to Google Maps JavaScript API v3
I've searched a long time but haven't been able to figure out how to
add a toggle or drop down menu that will change the language displayed
on the map. I can hard code the language change but I would like to
know if anyone has tried or even knows how to point me in the right
direction? Thanks.

Martin Matysiak

unread,
Jan 20, 2011, 10:40:34 AM1/20/11
to google-map...@googlegroups.com
Doing it the Non-AJAX way, just add a HTML Form with a drop-down selector. The values of the options contain the language codes. Upon selection the form will be submitted, and your PHP script pastes the language tag into the maps api url.

If you want to change it dynamically though, you probably can fetch the localized api afterwards (and it should probably overwrite the existing one), but if I'm correct you would also have to recreate your google.maps.Map object in order to see the localized strings.

But anyway, there is no internal function inside the google maps API to change the language. You have to do it manually, one way or another

DezzyLee99

unread,
Jan 20, 2011, 11:33:28 AM1/20/11
to Google Maps JavaScript API v3
I thought just about as much, I would of preferred it to be dynamic,
but thanks for confirming that for me.
Reply all
Reply to author
Forward
0 new messages