MKCoordinateSpan defines a range, i.e. delta, in the directions of latitude and longitude, which should be displayed on the map. Along with the point, you can then determine the region to display on the map.
CLLocationCoordinate2D defines a single point in the latitude and longitude coordinate system.
For example:
|<---- deltaLat ---->| |---------------------|--- | | | | | | | | | | | | | + |deltaLon | (lat,lon) | | | | | | | | | | | |---------------------|---
Here you can imagine the center point (lat,lon) about which you have deltaLat and deltaLon .
So, (lat,lon) will be CLLocationCoordinate2D , and deltaLat, deltaLon will form a MKCoordinateSpan .
You are right that both structures are defined identically, but it is quite common when two different structures have different semantics and therefore are defined separately, as you have already found.
mattjgalloway
source share