0

Im using twitter stream api for my ios project. Stream API has a location parameter. How can i get bounding box coordinates from user location(lat/long) and 1km distance ? Is there any API or tool in MapKit or mathematical functions ?

Input

(latitude = 37.785834, longitude = -122.406417)
Distance = 1000 meter

Output

latMin: 37.789934 longMin : -122.416417
latMax: 37.787834  longMax : -122.396417
bguler
  • 237
  • 1
  • 5
  • 11
  • possible duplicate of [How to calculate the bounding box for a given lat/lng location?](http://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location) – Ahmet Aygun Jul 08 '14 at 22:38
  • 1
    See http://stackoverflow.com/a/2409582/467105. –  Jul 09 '14 at 02:24

1 Answers1

0

Yep, check out the functions in <MapKit/MKGeometry.h> like MKMetersPerMapPointAtLatitude(), which will allow you to convert distance to map points, then map points to screen points.

incanus
  • 5,100
  • 1
  • 13
  • 20
  • Actually i don't want convert anything to map points. Just need boundary coordinates from user location. I've added example for clarity. – bguler Jul 08 '14 at 19:42