Closed Gabotron-ES closed 3 weeks ago
Hey @Gabotron-ES, if I am understanding correctly, the map is briefly black before rendering.
One approach to this problem is to use setState to create a mapOpacity variable that defaults to 0 and then setMapOpacity to 1 onDidFinishLoadingMap.
const [mapOpacity, setMapOpacity] = useState(0);
...
<MapLibre.MapView
style={[{ height: '100%' }, { opacity: mapOpacity }]}
onDidFinishLoadingMap={() => setMapOpacity(1)}
Hi everybody, my map view shows a black flash when map is starting , is there a way to fix this? also is there a way to check if map is loaded, I could show a spinner this way.