mapbox-gl-js version: 1.2.1
Is there a way to reuse mapbox loads?
My use case is an app where the pages are navigated via react router and 1 of the pages is a map. Currently I am creating a map each time the user visits the page but I'd like to be able to reuse loads + token uses if possible when navigating away from and back to the map page.
Sorry if duplicate issue -- I searched old issues and stackoverflow and couldn't find something very closely related
Thanks
Has there been any progress made on this issue? Maybe a workaround to still get the desired behaviour? I am currently in the same predicament where I am wanting to let the user search for a specific location and show it on a MapBox map. That same map+location instance reappears later on in the application. Instead of reloading mapbox I would like to reuse the instance for quicker and more seamless loading times.
mapbox-gl-js version: 1.12.0
We have a similar use case in an Angular application.
We would like to maintain a single instance in a service and be able to reuse it in many components, cleaning up/toggling layers according to the component's role.
Most helpful comment
Has there been any progress made on this issue? Maybe a workaround to still get the desired behaviour? I am currently in the same predicament where I am wanting to let the user search for a specific location and show it on a MapBox map. That same map+location instance reappears later on in the application. Instead of reloading mapbox I would like to reuse the instance for quicker and more seamless loading times.