[Bug] Type MapLayerMouseEvent
for onClick
on <Map>
does not match data
#2299
Labels
MapLayerMouseEvent
for onClick
on <Map>
does not match data
#2299
Description
The type I get in VS Code is
(property) features?: Feature<Geometry, GeoJsonProperties>[] | undefined
(I include
Map
fromreact-map-gl/maplibre
.)However, the generic
GeoJsonProperties
is not quite right, it does not type the special properties likesource
.I don't understand where this information is lost …
react-map-gl/src/types/events-maplibre.ts
Line 35 in e11b41e
features
areMapGeoJSONFeature
https://github.com/maplibre/maplibre-gl-js/blob/572d6071fd5fce9f71bdb267f05532616e8d7be0/src/ui/events.ts#L17C66-L17C66 andMapGeoJSONFeature
has all the data/types we expect https://github.com/maplibre/maplibre-gl-js/blob/main/src/util/vectortile_to_geojson.ts#L18C1-L23Expected Behavior
The react map gl types should match the Maplibre types.
Steps to Reproduce
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: