Closed sarrabr closed 2 years ago
Hi everyone, I tried to apply dl.Overlay on multiple inputs (markers and circles) but it shows me an overlay for each input separately.
I want to have at the end a single overlay for all the markers and the circles around. Any suggestions ?
Here's the code i implemented. `import dash import dash_leaflet as dl
app = dash.Dash()
app.layout = dl.Map( [ dl.LayersControl([ dl.Overlay([dl.CircleMarker(center=(48.0073849, 0.1967849), radius=3, color='red'), dl.Circle(center=(48.0073849, 0.1967849), radius=20000), dl.CircleMarker(center=(46.0073849, 0.1867849), radius=3, color='red'), dl.Circle(center=(46.0073849, 0.1867849), radius=20000), ], name='Exemples', checked=True) ]), dl.TileLayer(), ], style={'width': '1000px', 'height': '500px'}, center=[46.232192999999995, 2.209666999999996], zoom=5 )
if name == 'main': app.run_server() `
Thanks
This seems more like a question than a bug report. Please post questions on SO, preferable using the [dash-leaflet] tag, and report bugs here.
[dash-leaflet]
Hi everyone, I tried to apply dl.Overlay on multiple inputs (markers and circles) but it shows me an overlay for each input separately.
I want to have at the end a single overlay for all the markers and the circles around. Any suggestions ?
Here's the code i implemented. `import dash import dash_leaflet as dl
app = dash.Dash()
app.layout = dl.Map( [ dl.LayersControl([ dl.Overlay([dl.CircleMarker(center=(48.0073849, 0.1967849), radius=3, color='red'), dl.Circle(center=(48.0073849, 0.1967849), radius=20000), dl.CircleMarker(center=(46.0073849, 0.1867849), radius=3, color='red'), dl.Circle(center=(46.0073849, 0.1867849), radius=20000), ], name='Exemples', checked=True) ]), dl.TileLayer(), ], style={'width': '1000px', 'height': '500px'}, center=[46.232192999999995, 2.209666999999996], zoom=5 )
if name == 'main': app.run_server() `
Thanks