Hey there,
So i see that the problem is that the G_Physical_Map is not a string
object... here is a function that I wrote that might help you..
function mapView(mapview) {
if (mapview == "satellite") {
map.setMapType(G_SATELLITE_MAP);
} else if (mapview == "normal") {
map.setMapType(G_NORMAL_MAP);
} else if (mapview == "hybrid") {
map.setMapType(G_HYBRID_MAP);
} else if (mapview == "earth") {
map.setMapType(G_SATELLITE_3D_MAP);
}
}
..notice that there are no quotation marks around the maptype...
-Edgar
On Jul 28, 3:30 pm, MarkusF <[email protected]> wrote:
> Sorry, may be a silly question, but how to change the map type in
> running mode ?
> I know that I can set the maptype via constant by using:
>
> map.setMapType(G_PHYSICAL_MAP);
>
> But how to change it when getting the new maptype f.e. via ajax ?
> This might not work:
>
> maptype = 'G_PHYSICAL_MAP';
> map.setMapType(maptype);
>
> Any help appreciated.....Many thanks
>
> Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---