如何禁用Google地图的卫星视图? [英] How to disable Google Map's Satellite view?

查看:145
本文介绍了如何禁用Google地图的卫星视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



一切工作正常,但我想禁用出现在右上角卫星地图的按钮按钮。



我该怎么做?

预先致谢。

解决方案

当您启用地图并将选项传递给它时,您有机会指定mapTypeControlOptions。它们具有一个数组,用于指定您允许用户查看哪种类型的Maptype。在这里可以看到 http://code.google.com/ apis / maps / documentation / javascript / reference.html#MapTypeControlOptions



如果您不希望用户对maptype有任何选择,您还可以通过将maps mapType设置为false来指定。


I am working on Google Maps Javascript API V 3.

Everything is working fine but I want to disable the MAP button which appears in the top right area with SATELLITE button.

How can I do this?

Thanks in advance.

解决方案

When you enable the map and passes the options to it, you have the chance to specify a mapTypeControlOptions. These have an Array that specifies what kind of maptype's you will allow the user to be able to see. It can be seen here http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeControlOptions.

If you don't want the user to have any options as to the maptypes, you can also specify that by setting the maps mapTypeControl to false.

这篇关于如何禁用Google地图的卫星视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆