I was unhappy with the existing options to add maps to dash. Hence, I created a leaflet component to use in dash. You can find and download it here. It is pretty much tailored to my needs. If you wish to extend it, fix something or add functionality please do so.
I hope this helps anyone who needs it.
Awesome! Would love to see some screenshots / code snippets if you have them available. Thanks for sharing
Will do tomorrow. It’s on my work laptop.
@all please be aware, that this was my first time really working with JS and react. So there will likely be a lack of functionality and bugs (such as one I’m currently working on considering popups on the map). I can’t promise that I will be able to fix any of this let alone have time to do so . If you need something urgently you might have to do it by yourself.
So here you go with some screenshots. This is a basic map of Switzerland including some open data from the Swiss Federal Railways (available here). It’s possible to provide one or many baselayers. If there are multiple, they will be added in a layer control element on the top right.
I added all stops and the railroads as Geojson to the map.These can be turned on and off in the layer control.