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

SideBySideLayers not displaying the layers #1846

Closed
brunoparente93 opened this issue Dec 11, 2023 · 2 comments
Closed

SideBySideLayers not displaying the layers #1846

brunoparente93 opened this issue Dec 11, 2023 · 2 comments
Labels
More info needed We need more info to assess this issue

Comments

@brunoparente93
Copy link

brunoparente93 commented Dec 11, 2023

Describe the bug
I am trying to use the folium plugin SideBySideLayers together with streamlit. In my app, I created 2 columns, so the users can select the layers they want to compare using the folium SideBySideLayers plugin.

The plugin works when I write the layer name, but it does not work when I add the argument layer in a variable or sometimes, it works only one side.

PS: the same happens with DualMap

To Reproduce

def layer_comparison(right, left):   #string variables
    url = "some url"
   


    m3 = folium.Map(location=[52.37361, 9.73783], zoom_start=11,tiles='cartodb positron')
            
    layer_right = folium.raster_layers.WmsTileLayer(
            url=url,
            name="Max Überflutunghohe (ohne Kanal 100a)",
            fmt="image/png",
            transparent=True,
            layers=right,
            overlay=True,
        )
            
    layer_left = folium.raster_layers.WmsTileLayer(
            url=url,
            name="Max Überflutunghohe (ohne Kanal 30a)",
            fmt="image/png",
            transparent=True,
            layers=left,
            overlay=True,
       )

    sbs = folium.plugins.SideBySideLayers(layer_left=layer_left, layer_right=layer_right)

    layer_left.add_to(m3)
    layer_right.add_to(m3)
    sbs.add_to(m3)
    return m3

layer_comparison('mk100','ok50')

Can someone help me to fix this issue?

Thank you in advance!

@Conengmo
Copy link
Member

I can't reproduce your issue. Using WmsTileLayer with SideBySideLayers works for me as expected. Can you provide a fully standalone working example? I don't know what url you are using.

Is WmsTileLayer working when you add it to the map without SideBySideLayers?

@Conengmo Conengmo added the More info needed We need more info to assess this issue label Dec 24, 2023
@Conengmo
Copy link
Member

I'll close this issue since it's stale and missing information. If new information comes up, we can reopen it.

@Conengmo Conengmo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More info needed We need more info to assess this issue
Projects
None yet
Development

No branches or pull requests

2 participants