maplibre-gl-leaflet
maplibre-gl-leaflet copied to clipboard
L.maplibreGL options is missing `style`
After updating from 0.0.17 to 0.0.18 the example in README won't compile with typescript because style property is missing in the type.
L.maplibreGL({
style: 'https://api.maptiler.com/maps/topo/style.json?key=<YOUR_MAPTILER_API_KEY>'
})
Thanks for reporting, @zdila. I'm a bit confused why, since the style property exists in the upstream type being used. Can you share what your maplibre-gl-js version is?
Version of maplibre-gl I use is 2.4.0, Leaflet 1.9.3, TypeScript 4.7.4
For some reason typescript uses Map and MapOptions from @types/leaflet/index.d.ts and not from maplibre-gl/dist/maplibre-gl.d.ts.

I have this problem as well. I suppressed it with // @ts-ignore for the time being, but it should resolved.
Hey guys! Any updates? The problem still persists and it's quite annoying 😅
What was wrong with the aliases? (https://github.com/maplibre/maplibre-gl-leaflet/pull/43) It seems to work perfectly...
I made the smallest possible fix for this issue in the open PR. Please review :)
I can confirm that this has been resolved in 0.0.21 for us.