Skip to content

Commit 87e0e1b

Browse files
dfallingclaude
andcommitted
Drop the map loading indicators
Remove both the GPS-wait overlay and the viewport-hydration spinner. The hydration read is fast enough that the brief blank frame is less distracting than a flashed spinner, and the GPS-wait overlay only ever appeared on first-ever launch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 445334a commit 87e0e1b

1 file changed

Lines changed: 5 additions & 31 deletions

File tree

src/map/MapScreen.tsx

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ import {
1010
} from '@maplibre/maplibre-react-native';
1111
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
1212
import type {NativeSyntheticEvent} from 'react-native';
13-
import {
14-
ActivityIndicator,
15-
StyleSheet,
16-
Text,
17-
TouchableOpacity,
18-
View,
19-
} from 'react-native';
13+
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
2014
import {useSafeAreaInsets} from 'react-native-safe-area-context';
2115
import {
2216
type ElementsQuery,
@@ -182,12 +176,11 @@ export function MapScreen() {
182176
});
183177
}, [elementsById, bounds]);
184178

179+
// Brief blank frame while the saved viewport hydrates from storage; the
180+
// camera's initialViewState is set once, so we wait for the resolved value
181+
// rather than rendering the map at the default world view first.
185182
if (savedViewport === undefined) {
186-
return (
187-
<View style={[styles.container, styles.hydrating]}>
188-
<ActivityIndicator size="large" color="#1d6fe0" />
189-
</View>
190-
);
183+
return <View style={styles.container} />;
191184
}
192185

193186
const initialViewState = savedViewport
@@ -215,11 +208,6 @@ export function MapScreen() {
215208
) : null,
216209
)}
217210
</MapLibreMap>
218-
{!savedViewport && !position ? (
219-
<View pointerEvents="none" style={styles.loadingOverlay}>
220-
<ActivityIndicator size="large" color="#1d6fe0" />
221-
</View>
222-
) : null}
223211
{position && !isCenteredOnUser ? (
224212
<TouchableOpacity
225213
accessibilityLabel="Recenter map on your location"
@@ -243,10 +231,6 @@ const styles = StyleSheet.create({
243231
map: {
244232
flex: 1,
245233
},
246-
hydrating: {
247-
alignItems: 'center',
248-
justifyContent: 'center',
249-
},
250234
pin: {
251235
width: 36,
252236
height: 36,
@@ -262,16 +246,6 @@ const styles = StyleSheet.create({
262246
lineHeight: 22,
263247
textAlign: 'center',
264248
},
265-
loadingOverlay: {
266-
position: 'absolute',
267-
top: 0,
268-
left: 0,
269-
right: 0,
270-
bottom: 0,
271-
alignItems: 'center',
272-
justifyContent: 'center',
273-
backgroundColor: 'rgba(255,255,255,0.6)',
274-
},
275249
recenterButton: {
276250
position: 'absolute',
277251
right: 16,

0 commit comments

Comments
 (0)