Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change MapTypeid in Google Maps API v3?

I need to change the map type from RoadMap to Hybrid when a user clicks on a marker (it automatically zoom's and center's on it already)

I can't find anything on Google's API documentation for 3.2 on how to do that. Any help would be appreciated!

like image 984
AcidRaZor Avatar asked Sep 09 '10 12:09

AcidRaZor


1 Answers

You need to call setMapTypeId on your map object:

setMapTypeId(mapTypeId:MapTypeId)

where mapTypeId is HYBRID.

like image 85
RedBlueThing Avatar answered Sep 24 '22 14:09

RedBlueThing