visgl / react-map-gl

React friendly API wrapper around MapboxGL JS
http://visgl.github.io/react-map-gl/
Other
7.88k stars 1.35k forks source link

[Bug] Type `MapLayerMouseEvent` for `onClick` on `<Map>` does not match data #2299

Closed tordans closed 5 months ago

tordans commented 1 year ago

Description

The type I get in VS Code is (property) features?: Feature<Geometry, GeoJsonProperties>[] | undefined

image

(I include Map from react-map-gl/maplibre.)

However, the generic GeoJsonProperties is not quite right, it does not type the special properties like source.

I don't understand where this information is lost …

Expected Behavior

The react map gl types should match the Maplibre types.

Steps to Reproduce

-

Environment

Logs

No response

tordans commented 5 months ago

I am using "react-map-gl": "7.1.7" ATM and this issue is not present anymore. => Closing