Google地图,为叠加层设置空间 [英] Google maps, set space for overlays
问题描述
让我们说这是我的谷歌地图非常正确:
我有一个包含信息的不透明盒子,我想知道是否有一种方法
让标记之类的重叠图标不出现在盒子后面或为它们定义区域或添加一个整体覆盖页边距填充或者像让谷歌滚动地图,直到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屋!