Currently the MapControls are set and listened to in the LaunchedEffect in MapLibre.ktL#111. This means that anytime the map controls change, the entire MapLibre launched effect re-runs, fetching the style and rebuilding the map in a new coroutine context. This is particularly problematic if the MapControls change rapidly more than once before the style can load.
Desired behavior
We want MapControls to be settable at any time and simply run an applier process like the MapViewCamera to change the map controls on the existing map.
Currently the MapControls are set and listened to in the
LaunchedEffect
inMapLibre.ktL#111
. This means that anytime the map controls change, the entire MapLibre launched effect re-runs, fetching the style and rebuilding the map in a new coroutine context. This is particularly problematic if the MapControls change rapidly more than once before the style can load.Desired behavior
We want MapControls to be settable at any time and simply run an applier process like the MapViewCamera to change the map controls on the existing map.