Customize look of the Google Maps “mapType” controls

微笑、不失礼 提交于 2019-12-24 21:34:34

问题


Is it possible to style the look of the mapType controls (top right "Map", "Satellite", "Hybrid") in Google maps? (using V2 of the API). Or is there a way to create your own elements and have them control the mapType??


回答1:


Yes, it it possible both to change the look of the current controls and to define new ones:

look here for the functions you need: http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMapType

and some examples: create custom controls: http://code.google.com/apis/maps/documentation/javascript/v2/controls.html#Custom_Controls modify appearance of controls: http://code.google.com/apis/maps/documentation/javascript/v2/controls.html#Control_Modification



来源:https://stackoverflow.com/questions/4237022/customize-look-of-the-google-maps-maptype-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!