-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Target Use Case
I have an instance of mapbox already being used in my app and when I was on an older version of react-map-gl I was create a context with the map instance and still using the Layer and Source components as normal.
After the upgrade I can't do this anymore so in my case where I have part of my app not written in React and part of it using React, I can't extend my existing map using react-map-gl as I was before.
Example:
<MapContext.Provider
value={{
map: {
getMap: () => map,
} as any,
mapLib: mapboxgl as MapboxAsMapLib,
}}
>
.....Where map was a prop of my component.
Proposal
Since I can't override the context anymore, it would be nice if the main Map component could receive an existing external map instance as an option
lucasprograms and gareth-cheeseman