最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to change MapTypeid in Google Maps API v3? - Stack Overflow

programmeradmin1浏览0评论

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!

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!

Share Improve this question edited Dec 31, 2013 at 3:17 Kara 6,22616 gold badges53 silver badges58 bronze badges asked Sep 9, 2010 at 12:06 AcidRaZorAcidRaZor 5664 silver badges9 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

You need to call setMapTypeId on your map object:

setMapTypeId(mapTypeId:MapTypeId)

where mapTypeId is HYBRID.

发布评论

评论列表(0)

  1. 暂无评论