diff options
Diffstat (limited to 'src/Components/Map.tsx')
-rw-r--r-- | src/Components/Map.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Components/Map.tsx b/src/Components/Map.tsx index 68698f4..bb0b660 100644 --- a/src/Components/Map.tsx +++ b/src/Components/Map.tsx @@ -98,13 +98,13 @@ class Map extends Component<Props, State> { if (!this.state.user) { return <View style={styles.spinnerContainer}><ActivityIndicator size={'large'} /></View> } - + const initialRegion = { ...this.state.user, latitudeDelta: 0.002, longitudeDelta: 0.002 } return ( <> <MapView ref={r => (r != null) ? this.map = r : null} style={styles.container} - initialRegion={{ ...this.state.user, latitudeDelta: 0.002, longitudeDelta: 0.002 }} + initialRegion={initialRegion} onRegionChangeComplete={this.onRegionChange} showsCompass={false} showsScale @@ -112,9 +112,11 @@ class Map extends Component<Props, State> { showsMyLocationButton loadingEnabled type={'hybrid'} + shouldRasterizeIOS + renderToHardwareTextureAndroid > - <MapObjects onPortalClick={this.onPortalClick} /> - {this.state.selectedPortal && <Marker coordinate={this.state.selectedPortal.coords} />} + <MapObjects onPortalClick={this.onPortalClick} region={this.state.region || initialRegion} /> + {this.state.selectedPortal && <Marker cluster={false} coordinate={this.state.selectedPortal.coords} />} </MapView> <MapOverlay goToMe={this.goToMe} |