I have many coordinates that I am plotting using a MKMapOverlay
and CoreLocation
and I want to be able to contain them all in a view.
How can I contain them all? I thought about taking the halfway point between my first and last coordinate, but if it's not a direct route or if they end up at the same location, then some coordinates may be cut out of the screen.
For example, this would be an example with some points cut out to the bottom right. Note: this is just for example purposes and the path is created with Google Maps, but in the application it will be created by tracking your location history.
Again, if this were on the iPhone, how could I make the map contain all of the points using MKCoordinateRegion
?