Closed tordans closed 5 months ago
The type I get in VS Code is (property) features?: Feature<Geometry, GeoJsonProperties>[] | undefined
(property) features?: Feature<Geometry, GeoJsonProperties>[] | undefined
(I include Map from react-map-gl/maplibre.)
Map
react-map-gl/maplibre
However, the generic GeoJsonProperties is not quite right, it does not type the special properties like source.
GeoJsonProperties
source
I don't understand where this information is lost …
features
MapGeoJSONFeature
The react map gl types should match the Maplibre types.
-
No response
I am using "react-map-gl": "7.1.7" ATM and this issue is not present anymore. => Closing
"react-map-gl": "7.1.7"
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 …
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