NG
[n-1, n, n+1]
Ну и сдвигаю индексы по кругу в зависимости куда свайп.
Странно что нет из коробки, такой фичи.
Size: a a a
NG
ДЛ
J
J
NG
IK
ДЛ
IK
IK
react-native-appearance
IK
NG
IK
IK
NG
NG
IK
react-native-appearance
NG
F
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import MapView from 'react-native-maps';
import Overlay from './Overlay.js';
export default function App() {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
function getInitialState() {
return {
region: {
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
},
};
}
function onRegionChange(region) {
this.setState({ region });
}
return (
<View style={styles.container}>
<MapView
region={this.state.region}
onRegionChange={this.onRegionChange}
/>
</View>
);
}
F