我必須在我的地圖上添加自定義城市名稱circleMarker
。但我想CLIC THROU標籤,因爲已經在它之下polygone 還有就是我的JS代碼,多數民衆贊成加circleMarker
單張標籤no隱藏無指針事件
var ville_label = new L.CircleMarker(
[lat, lng],
{ clickable: false, radius: (1/zoom)*12 }
).bindLabel(lib, { noHide: true, className: "leaflet-ville-label" })
.addTo(ville_layer);
在CSS我有禁用指標事件
.leaflet-ville-label {
pointer-events: none;
}
但是IE沒有按」 t supprot pointer-events
並且標籤是div元素而不是SVG。
有人有一個解決方案,在靜態標籤禁用鼠標事件?
是的,我已經測試,但'document.elementFromPoint'不能返回地圖KML元素。 – DoubleYo
我錯過了一個點來隱藏curretn元素。但是我現在有一個'path'或'g'元素。你能從中得到polygone嗎? – DoubleYo
這裏有點功能,我發現轉換路徑:http://whaticode.com/2012/02/01/converting-svg-paths-to-polygons/ – Igle