You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the following error from TypeScript when using useControl from react-map-gl/maplibre and MapboxOverlay when following the documentation.
Type 'MapboxOverlay' does not satisfy the constraint 'IControl<MapInstance>'.
Types of property 'onAdd' are incompatible.
Type '(map: Map$1) => HTMLDivElement' is not assignable to type '(map: MapInstance) => HTMLElement'.
Types of parameters 'map' and 'map' are incompatible.
Type 'MapInstance' is missing the following properties from type 'Map$1': style, painter, _container, _missingCSSCanary, and 245 more.ts(2344)
(I spotted that somebody else has a similar issue in #8250 (comment))
Flavors
Script tag
React
Python/Jupyter notebook
MapboxOverlay
GoogleMapsOverlay
CartoLayer
ArcGIS
Expected Behavior
No TypeScript error when using useControl with the MapboxOverlay. Or maybe we need something like MaplibreOverlay?
Description
I am getting the following error from TypeScript when using
useControl
fromreact-map-gl/maplibre
andMapboxOverlay
when following the documentation.(I spotted that somebody else has a similar issue in #8250 (comment))
Flavors
Expected Behavior
No TypeScript error when using
useControl
with theMapboxOverlay
. Or maybe we need something likeMaplibreOverlay
?Steps to Reproduce
Build the example that is in the documenation.
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: