[英]centering google maps overlay
I'm trying to make an overlay that looks like a target. 我正在尝试制作看起来像目标的叠加层。 That 'target' overlay should be always centered and not clickable and should behave like a map tile.
该“目标”叠加层应始终居中且不可点击,并且其行为应类似于地图图块。 When i append it to a map tile as a ground overlay the 'target' moves with the scope.
当我将其作为地面叠加层附加到地图图块时,“目标”随范围一起移动。
https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay
I also thought i could use http://mabp.kiev.ua/2010/09/10/raphael-overlay/ (ground overlays with raphael js in russian..) 我还认为我可以使用http://mabp.kiev.ua/2010/09/10/raphael-overlay/ (用俄语的raphael js覆盖地面。)
How can i create a native maps overlay that is not attached to a map tile? 如何创建未附加到地图图块的本机地图叠加层?
Any ideas? 有任何想法吗?
On the example Custom control I used the following code to center it ( CENTER
instead of TOP_CENTER
) 在示例自定义控件上,我使用以下代码将其居中(
CENTER
而不是TOP_CENTER
)
map.controls[google.maps.ControlPosition.CENTER].push(centerControlDiv);
This works fine for me. 这对我来说很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.