ismyrnow / leaflet-groupedlayercontrol

Leaflet layer control with support for grouping overlays together.
MIT License
274 stars 141 forks source link

How to implement with python #72

Open MiguelErtana13 opened 3 years ago

MiguelErtana13 commented 3 years ago

Does someone know how to implement this code in my python file?

MiguelErtana13 commented 3 years ago

Im using a flask app

ikoojoshi commented 3 years ago

Hi Miguel, So folium is a Python library built on Leaflet.js While using Folium 2 years back, I faced this same issue - I wanted the grouped layer control feature on python and came across this solution I was able to find a workaround and implemented this in Python using Folium. You can have a look at the code - https://github.com/ikoojoshi/Folium-GroupedLayerControl

MiguelErtana13 commented 3 years ago

Hey Ipshita,

Thanks for your help! But im still struggling to combine this with my current flask application. So when I run your code within a flask application I get this:

Schermafbeelding 2021-05-12 om 20 50 24

and when I run the http 5000/ in my browser, the website just flickers...

btw: im still learning and I don't have a lot of experience yet

MiguelErtana13 commented 3 years ago

@ikoojoshi