React-native-maps 限制平移区域

Ada*_*vik 7 google-maps reactjs react-native react-native-maps

有没有办法将地图限制在特定区域,以便平移和缩放包含在该区域内,而外部的所有内容都被锁定?我想限制用户可以在地图上看到的区域。我通过react-native-maps使用谷歌地图https://github.com/react-community/react-native-maps

这是我的代码,目前您可以缩放多远或可以向两侧平移多少没有限制

    <View style={styles.container}>
        <MapView style={styles.map}
          provider= { PROVIDER_GOOGLE }
          customMapStyle={mapStyle}
          initialRegion={{
            latitude: 59.2937025,
            longitude: 18.0813377,
            latitudeDelta: 0.012,
            longitudeDelta: 0.012,

          }}
        />
    </View> 
Run Code Online (Sandbox Code Playgroud)