Layer control and Fullscreen disappear after adding another layer
See original GitHub issueHere is the first part of the code where I create a map with many layers
mapa_keys = folium.Map(width=1000, height=1000, zoom_start=11,
location=[53.132489, 23.16884], tiles='cartodbpositron')
for key in list(locations_dict.keys()):
HeatMap(locations_dict[key], name=key, radius = 20).add_to(mapa_keys)
folium.LayerControl().add_to(mapa_keys)
plugins.Fullscreen(
position='topright',
title='rozwiń na pełny ekran',
title_cancel='wyłącz tryb pełnego ekranu',
force_separate_button=True).add_to(mapa_keys)
mapa_keys.save("static_per_type.html")
Explanations: structure of the locations_dict
is just like
{"something": [[lat,lon], [lat,lon]... ] ... }
Then I decided to add a different heat map that is not included in the dictionary I’ve mentioned
others_hm = HeatMap(locs, name="others", radius=20)
kibice_hm.add_to(mapa_others)
kibice_hm.add_to(mapa_keys)
folium.LayerControl().add_to(mapa_keys)
mapa_keys.save("static_extended.html")
Problem description
The HeatMap object alone works – on a the mapa_others
everything looks fine.
The problem is with the bigger map. I’d like to have the heat map just as a another layer on the working map I created earlier but instead I get the layer added but LayerControl and Fullscreen button disappear so that I can’t chose the layer.
The buttons are simply not showing up after adding another HeatMap layer
folium.__version__
returns '0.5.0'
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Icon inside Leaflet control layer does not display?
1 Answer 1 · it is actually missing I checked it. I added the folder images but still the problem persists. I did...
Read more >Fullscreen video disappears when using CSS transform on ...
1985.143 Safari/537.36 Steps to reproduce: Create a video element that opens in an overlay, then click that video element's fullscreen button. The basic...
Read more >Control panel overlay doesn't appear in fullscreen mode for 3 ...
When a video is playing in a window, I double click on it for full screen, move my mouse, the control panel shows....
Read more >Text that I added to video disappears in full screen mode
The text is added as expected but when I put the video in full screen mode the text disappears. This problem was present...
Read more >Why won't the controls disappear in Windows Media Player?
Open Windows Media Player. Press F10. Go to Tools > Options. There is a checkbox named Allow autohide of playback controls : check...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There seems to be a problem with the ordering of the individual entities. If you take the following code snippet:
There are two cases considered here: (1) if the second feature group is added to the map after the layer control is added, there is a rendering error (2) if the second feature group is added to the map before the layer control is added, it works fine.
Is there a possibility to reorder the children of the map and force a rerendering? I tried to modify m1._children appropriately, but this had no impact on the resulting html code.
I’m closing this issue since there is no update on it. Feel free to add additional info, we can reopen if needed.