Leaflet-heat and L.control.layer usage

211 views
Skip to first unread message

Jon Galloy

unread,
Jul 2, 2015, 4:50:41 PM7/2/15
to leafl...@googlegroups.com
I am fairly new to leaflet but have created a working script that is using L.control.layers with 3 base map options (tileLayers) and 3 overlay options (a line, a polygon, and point(s)). The point layer features a pop-up with the relevant data i want displayed. All of these components work fine...the issue arises when i create a heatmap layer that i want to add to the layer control. regardless of where i place the creation of the heat layer and its geojson in the script, it covers up the 'clickable' point feature so as to make it 'unclickable'. i played around with the zindex option but that didn't seem to do the trick. Is there a simple way to get this to work the way i want it to? 

I would post the script but all the data is held in-line...and it can not be shared and i am using the CDN's for leaflet and leaflet-heat form github. As i said, individually all the components work fine except being able to place that heat layer as the first layer on top of the base layers so as to keep my pop-up 'selectable'. I was able to change the opacity of the heatlayer so you can at least see the points under the heat layer but that is a very poor solution for what i need to do.

Thanks.

Руслан Артамонов

unread,
Jul 3, 2015, 1:32:15 AM7/3/15
to leafl...@googlegroups.com
Did you tried layer.bringToFront() and layer.bringToBack() functions?

четверг, 2 июля 2015 г., 23:50:41 UTC+3 пользователь Stinky McGhee написал:

Jon Galloy

unread,
Jul 3, 2015, 8:29:19 AM7/3/15
to leafl...@googlegroups.com
Hi, yes...i did try both of those functions but neither seemed to work but i may have not implemented it correctly. I will play around with it some more to see if i can get it to work.
Thanks for the reply!

--

---
You received this message because you are subscribed to a topic in the Google Groups "Leaflet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leaflet-js/_2yxQySNXZw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages