Platform: iOS 26.6, iPhone 17 Pro
App version number: 1.0.26
Browser: n/a
URLs (aka web addresses) of any relevant observations or pages: n/a
Screenshots of what you are seeing: n/a
Description of problem:
In 30~40% of cold starts, the Explore map opens with no pins. But panning the map makes the pins appear.
Step 1: Open the app on iOS and go to the Explore tab.
Step 2: Sometimes pins appear, sometimes the map is empty.
Potential fix:
(I noticed there is a V1 and V2 of Explore, maybe this is a known issue fixed in V2?)
Root cause seems to be in react-native-maps, not in iNat code. I found a way to fix it on my own local build, but it is kind of hacky:
diff --git a/src/components/SharedComponents/Map/Map.tsx b/src/components/SharedComponents/Map/Map.tsx
index 7b165e20f..482d21ce0 100644
--- a/src/components/SharedComponents/Map/Map.tsx
+++ b/src/components/SharedComponents/Map/Map.tsx
@@ -43,6 +43,7 @@ const NEARBY_DIM_M = 50_000;
const CURRENT_LOCATION_ZOOM_LEVEL = 20; // target zoom level when user hits current location btn
const MIN_ZOOM_LEVEL = 0; // default in react-native-maps, for Google Maps only
const MIN_CENTER_COORDINATE_DISTANCE = 5;
+const TILE_URL_SETTLE_MS = 250;
const getDefaultRegion = ( initialLatitude?: number, initialLongitude?: number ) => ( {
latitude: initialLatitude || 25, // Default to something US centric
@@ -404,7 +405,25 @@ const Map = ( {
}
};
+ const [settledTileUrl, setSettledTileUrl] = useState<string | null>( null );
+
+ useEffect( ( ) => {
+ const timer = setTimeout(
+ ( ) => setSettledTileUrl( tileUrlTemplate ),
+ TILE_URL_SETTLE_MS,
+ );
+ return ( ) => clearTimeout( timer );
+ }, [tileUrlTemplate] );
+
+ const effectiveTileUrl = Platform.OS === "ios"
+ ? settledTileUrl
+ : tileUrlTemplate;
+ const effectiveShowPointTiles = effectiveTileUrl
+ ? effectiveTileUrl.includes( "/points/" )
+ : showPointTiles;
+
const shouldOverlayObsTiles = ( withPressableObsTiles || withObsTiles )
+ && ( Platform.OS !== "ios" || !!settledTileUrl )
&& (
Platform.OS !== "android"
|| previousTileUrl === tileUrlTemplate
@@ -555,9 +574,9 @@ const Map = ( {
<UrlTile
testID="Map.UrlTile"
tileSize={512}
- urlTemplate={tileUrlTemplate}
+ urlTemplate={effectiveTileUrl}
opacity={
- showPointTiles
+ effectiveShowPointTiles
? 1
: 0.7
}