When I need to make an MKCoordinateRegion
, I do the following:
var region = MKCoordinateRegion
.FromDistance(coordinate, RegionSizeInMeters, RegionSizeInMeters);
very simple - works perfectly.
Now I wish to store the value of the current region span. When i look at the region.Span
value, it’s an MKCoordinateSpan
which has two properties:
public double LatitudeDelta;
public double LongitudeDelta;
How can I convert the LatitudeDelta
value into a latitudinalMeters
please? (So then I can recreate my region (later on) using the above method...
Swift implementation for Hannes solution:
As I can see you already have the region of the map. It doesn't only contain the lat & long deltas but also the center point of the region. You can calculate the distances in meters as illustrated in the picture:
1: Get the region span (how big the region is in lat/long degrees)
MKCoordinateSpan span = region.span;
2: Get the region center (lat/long coordinates)
CLLocationCoordinate2D center = region.center;
3: Create two locations (loc1 & loc2, north - south) based on the center location and calculate the distance inbetween (in meters)
4: Create two locations (loc3 & loc4, west - east) based on the center location and calculate the distance inbetween (in meters)