How to calculate delta latitude and longitude for MapView component in React-Native?
问题 How can i calculate delta-latitude and delta-longitude values form latitude and longitude values for MapView component in React-Native. Thank You 回答1: If you have an array of coordinates and you want a region that will fit all these points, you can do something like this: const regionContainingPoints = points => { let minLat, maxLat, minLng, maxLng; // init first point (point => { minLat = point.latitude; maxLat = point.latitude; minLng = point.longitude; maxLng = point.longitude; })(points[0