Closed KiwiKilian closed 1 year ago
When using maplibre the type MapGeoJSONFeature is exported from react-map-gl/src/types/common.ts as:
MapGeoJSONFeature
react-map-gl/src/types/common.ts
export type MapGeoJSONFeature = GeoJSON.Feature<GeoJSON.Geometry> & { layer: any; source: string; sourceLayer: string; state: {[key: string]: any}; };
The MapLayerMouseEvent features MapGeoJSONFeature are typed from maplibre-gl/dist/maplibre-gl.d.ts:
MapLayerMouseEvent
maplibre-gl/dist/maplibre-gl.d.ts
export type MapGeoJSONFeature = GeoJSONFeature & { layer: DistributiveOmit<LayerSpecification, "source"> & { source: string; }; source: string; sourceLayer?: string; state: { [key: string]: any; }; };
The types should match. Will this be fixed by #2263?
https://codesandbox.io/s/react-map-gl-mapgeojsonfeature-h698nj?file=/src/index.tsx:608-636
No response
Try v7.1.5.
Looks good 🙏!
Description
When using maplibre the type
MapGeoJSONFeature
is exported fromreact-map-gl/src/types/common.ts
as:The
MapLayerMouseEvent
featuresMapGeoJSONFeature
are typed frommaplibre-gl/dist/maplibre-gl.d.ts
:Expected Behavior
The types should match. Will this be fixed by #2263?
Steps to Reproduce
https://codesandbox.io/s/react-map-gl-mapgeojsonfeature-h698nj?file=/src/index.tsx:608-636
Environment
Logs
No response