传单:标记上方的折线 [英] Leaflet: Polyline above Marker

查看:75
本文介绍了传单:标记上方的折线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Leaflet 0.7.7,其标记类型应位于我绘制的折线之后.

I am working with Leaflet 0.7.7 and have a marker type that should go behind Polylines that I draw.

通常,标记会在所有路径上方呈现,但是有没有办法让标记呈现在所有路径下方?谢谢.

Usually markers are rendered above all Paths but is there a way to get a marker to render below? Thanks.

推荐答案

您可以简单地在CSS中将overlayPane(包含矢量/折线的位置)和shadowPane(放置阴影的位置)更改为z-index ),或者如果您希望将所有标记都放在矢量下方,甚至markerPane.

You can simply change the z-index in CSS for the overlayPane (where your vectors / polylines are included) and shadowPane (where shadows are placed), or even the markerPane if you want ALL markers to be placed below vectors.

.leaflet-overlay-pane { z-index: 5; }
.leaflet-shadow-pane  { z-index: 4; }

演示: http://jsfiddle.net/ve2huzxw/39/

这篇关于传单:标记上方的折线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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