Closed Lawiss closed 1 year ago
No, I think the code looks OK. Do you get the same error if you use the data from the docs?
Otherwise, one guess might be due to the crs entry in the data,
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" }
I tried with the snippet in the doc :
points = [
dict(
lat=55.5 + random.random(), lon=9.5 + random.random(), value=random.random()
)
for i in range(100)
]
data = dlx.dicts_to_geojson(points)
res_div = html.Div(
[
dl.Map(
[
dl.TileLayer(),
dl.GeoJSON(data=data, zoomToBounds=True),
],
),
]
)
But the error remains. Same if I delete the "crs" key of the geojson. Maybe it is a problem with my python env :
Could you try the 0.1.23 release? It sounds like a problem with the environment - or a problem with the dash-leaflet build
The error remains also with 0.1.23 release (I had to downgrade protobuf to 3.18.3 to make it work). I tried downgrading also dash to 2.6 without success. Maybe it is a problem of python version ? My env is currently using python 3.10.
After investigating, I found that the issue is from a js package I'm using which visibly interfere with dash-leaflet : https://github.com/GouvernementFR/dsfr (it's the design system of french government). I am not a JS/React expert so I have not yet found the root cause of this "interference" but when I delete the dsfr package, the leaflet map work properly.
Hello,
I am trying to plot markers on map using dash-leaflet v0.1.25rc1. The problem is that i get a Javascript error "L.CRS is undefined". The code that generate the map is :
I verified the geojson file and it is fine, i've also tested (https://github.com/openlayers/openlayers/blob/main/examples/data/geojson/point-samples.geojson)[another geojson] without success. I am missing something ?