Represents the result of loading a map, with three possible states:
pending
success
error
const mapLoadResult = useMap(mapId);switch (mapLoadResult.status) { case "pending": return <ActivityIndicator />; case "success": return <MapView map={mapLoadResult.map} />; case "error": return <Text>Error: {mapLoadResult.error.message}</Text>;} Copy
const mapLoadResult = useMap(mapId);switch (mapLoadResult.status) { case "pending": return <ActivityIndicator />; case "success": return <MapView map={mapLoadResult.map} />; case "error": return <Text>Error: {mapLoadResult.error.message}</Text>;}
Represents the result of loading a map, with three possible states:
pending: The map is currently being loadedsuccess: The map has loaded successfully and is ready to useerror: The map failed to load