Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotline draw order #19

Open
jaronimoe opened this issue Jan 10, 2018 · 3 comments
Open

hotline draw order #19

jaronimoe opened this issue Jan 10, 2018 · 3 comments

Comments

@jaronimoe
Copy link

hi,

I just replaced my polylines with hotlines.
the lines are used as edges in a network graph -> they connect circles.
unfortunately now the hotlines are drawn behind the circles.
I didn't have this issue with the regular polylines.

I tried circle.bringToBack() as well as hotline.bringToFront() - but both without success unfortunately.
did you encounter this problem before? how did you solve it?

screen shot 2018-01-10 at 16 55 47

@klaftertief
Copy link
Contributor

This is because the hotline layer is renderer with a custom canvas based renderer, which is always rendered below SVG based layers.
You could manually override the z-index of canvas elements to but it above the svg element, or you could create your own custom hotline renderer to place it on a pane above the overlayPane. This can be done by setting the pane option in L.Hotline.render().
Hope this helps...

@jaronimoe
Copy link
Author

thank you, how do I set the pane option for a custom Hotline renderer?

@klaftertief
Copy link
Contributor

Just like for normal renderers, L.Hotline.renderer({pane: "markerPane"}). You can create your own pane, or use an existing one. See http://leafletjs.com/reference-1.2.0.html#renderer and http://leafletjs.com/reference-1.2.0.html#map-pane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants