How can i calculate delta-latitude and delta-longitude values form latitude and longitude values for MapView component in React-Native. Thank You
相关问题
- React Native Inline style for multiple Text in sin
- How Do I Convert Image URI into Byte Expo
- ApolloClient from apollo-boost attemped to assign
- Implementing ssl pinning in a react-native applica
- React-Native: Enable Performance Monitor in produc
相关文章
- Why do we have to call `.done()` at the end of a p
- Updating a map marker in android
- Remove expo from react native
- React Native - Dynamic Image Source
- Taking np.average while ignoring NaN's?
- “Unfortunately, app has stopped” error with buildi
- eslint Parsing error: Unexpected token =
- How to determine JS bottlenecks in React Native co
If you have an array of coordinates and you want a region that will fit all these points, you can do something like this:
Then use
region
with react-native-maps.Note: I do no error checking in my example.
longitudeDelta
andlatitudeDelta
is described will in the source code MapView, where it says difference between the minimum and maximum points that you want displayed.So, if you want to find the latitudeDelta then you should calculate the max difference between your latitudes and likewise for the longitude delta. You can look at Ryan H.'s answer to see an actual implementation.