Geojson in dl.LayersControl

Dear community,
I would like to add geojson files in dl.Map, which is organised in layers with dl.LayersControl.
I manage successfully to add the base layer and WMS layer, but no points and polygons which comes from geojson.
Any support will be highly appreciated.
Here is the code:

dl.Map(dl.LayersControl([dl.BaseLayer(dl.TileLayer(attribution=attribution_ch3), name=“Base map”, checked=True)]
+ [dl.Overlay(dl.GeoJSON(data=geojson_ch3_th00_points),
name=“smth”, checked=True)]
+ [dl.Overlay(dl.GeoJSON(data=geojson_ch3_th00_poly),
name=“smth2”, checked=True)]
+ [dl.Overlay(dl.WMSTileLayer(url=url_ch3,layers=“DEM”, format=“image/png”,
transparent=True), name=“Relief map”, checked=True)],
center=[42,25], zoom=8,
style={‘width’: ‘100%’, ‘height’: ‘80vh’, ‘margin’: “auto”, “display”: “block”}),

Does it work if you add the GeoJSON to the map directly?

1 Like

it works, the error is that I used ‘data’, and not ‘url’ to specify where my data are.
Thanks for the suggestion to check if it works directly in dl.Map