最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google maps api 3 - Marker on top of OverlayView , GoogleMaps API V3 JavaScript - Stack Overflow

programmeradmin8浏览0评论

How can I render a custom OverlayView item behind a marker. When a marker and the overlayView item intersects, always overlayview item is drawn on top. Is there a way to adjust their z depth accordingly ?

Thanks

How can I render a custom OverlayView item behind a marker. When a marker and the overlayView item intersects, always overlayview item is drawn on top. Is there a way to adjust their z depth accordingly ?

Thanks

Share Improve this question asked Apr 13, 2012 at 7:02 eenkoexeenkoex 532 silver badges7 bronze badges 0
Add a ment  | 

3 Answers 3

Reset to default 8

Found the answer here.

In the onAdd method replace:

panes.overlayImage.appendChild(div);

with:

panes.mapPane.appendChild(div);

The overlayLayer pane is also rendered below the markers:

var panes = this.getPanes();
panes.overlayLayer.appendChild(div);

You'll probably need to adjust the z-order of the contents of the OverlayView, as outlined here. Make the DOM nodes in the OverlayView have lower z-order values than the marker.

发布评论

评论列表(0)

  1. 暂无评论