iPhone dev - showing two locations on the map

Posted by Brian on Stack Overflow See other posts from Stack Overflow or by Brian
Published on 2010-05-06T19:33:11Z Indexed on 2010/05/06 19:38 UTC
Read the original article Hit count: 253

Now I have the coordinate of two locations, let say locationA with latitude 40 and longitude -80, locationB with latitude 30 and longitude -70,

I want to create a mapView that I can see both locations with appropriate viewing distance.

I got the new coordinate by finding the midpoint (in this example, {35, -75}), but the question is,

How can I get an appropriate viewing distance? In particular, how can I calculate CLLocationDistance (if I'm using MKCoordinateRegionMakeWithDistance) or MKCoordinateSpan (if I'm using MKCoordinateSpanMake).

Thanks in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about google-maps