如何禁用谷歌“鸟眼”在 OpenLayers 中查看?
我使用 Openlayers 和“谷歌卫星”作为基础层。从一定的缩放级别开始,图像切换到倾斜视图,称为“鸟瞰”视图,由谷歌提出。我想知道如何禁用它并仍然具有垂直视图
目前,我只是限制了缩放级别。但从长远来看,这个解决方案并不适合我。 (重要的是要注意:我只想使用“谷歌卫星”层)
我的基础层的定义:
gsat : new OpenLayers.Layer.Google(
"google satellite",
{type: google.maps.MapTypeId.SATELLITE,'sphericalMercator' : true}
),
最好的问候,
Ugo
I'm using Openlayers and "google satellite" as base layer. From a certain zoom level, the image switches to the oblique view, named "bird's eye" view and proposed by google. I'd like to know how to disable it and still have a vertical view
Currently, I've just limited the zoom level. But this solution doesn't suit me in the long term.
(Important to notice : I just want to use the "google satellite" layer)
Definition of my base layer :
gsat : new OpenLayers.Layer.Google(
"google satellite",
{type: google.maps.MapTypeId.SATELLITE,'sphericalMercator' : true}
),
Best regards,
Ugo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来你必须直接戳底层的 GMap 对象 - 我认为这样的事情应该做到这一点:
奇怪的是,我对 Google 文档的阅读表明,如果你想要它,你必须显式地打开它,并且OpenLayers 没有这样做,但似乎仍然明白这一点。
It looks like you will have to poke at the underlying GMap object directly - something like this should do it I think:
The weird thing is that my reading of the Google docs says that you have to explicitly turn it on if you want it, and OpenLayers isn't doing that, but still seems to get it.