Google地图,为叠加层设置空间 [英] Google maps, set space for overlays

查看:215
本文介绍了Google地图,为叠加层设置空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说这是我的谷歌地图非常正确:



我有一个包含信息的不透明盒子,我想知道是否有一种方法
让标记之类的重叠图标不出现在盒子后面或为它们定义区域或添加一个整体覆盖页边距填充或者像让谷歌滚动地图,直到infowindow完全看到,因为谷歌不在地图上时可以做到这一点

可能有人有意见对此?
是否可以轻松重写?



适用于 任何 提示



提前致谢

解决方案

创建自定义控件在控制位置 RIGHT_CENTER ,宽度等于宽度框的高度和 0 的高度。

0 的高度时,此控件将被隐藏,但API仍然会识别此控件并尝试将infoWindow平移到一个未被控件覆盖的位置。


let´s say this is the very right of my google map :

i have a box with opacity there containing information, i wonder if there was a way to let overlays like markers not appear behind the box or define an area for them or add an overall overlay margin padding or sth like let google scroll the map until the infowindow is in full sight as google does when its not on the map

maybe someone has an opinion to this? could there be an easy overridal?

for any hint

thanks in advance

解决方案

create a custom control at control-position RIGHT_CENTER with a width equal to the width of the box and a height of 0.

With the height of 0 this control will be hidden, but the API will still recognize this control and will try to pan the infoWindow to a position where it's not covered by the control.

这篇关于Google地图,为叠加层设置空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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