ios - Second thoughts on a tried code - Your views please -


i have been using thiscode years in app uses mapkit , corelocation frameworks:

   if ((abs(howrecent) < 5.0) && ((newlocation.horizontalaccuracy > 0.0f &&     newlocation.horizontalaccuracy < 150.0f))  ) 

however, having second thoughts following reason:

  1. i intended test first location update old update on first attempt. being checked on each update
  2. location awareness programming guide page 14 gives check:

    if (abs(howrecent) < 15.0) {

  3. the programing guide not mention horizontal accuracy if in cllocation class definition

am being cautious checking accuracy time? appreciate views if works well, if code throwing valid location update, won't know it. btw, app supports ios 4.3 6 , wrote version 3 , has updated on version 4. thank responses.

i suggest looked following:

- (void)locationmanager:(cllocationmanager*)manager didupdatelocations:(nsarray *)locations {     cllocation *loc2 = [[cllocation alloc] init];     loc2 = [locations lastobject]; 

then you're handling last location reported. if need specific horizontal accuracy - check


Comments

Popular posts from this blog

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

python - Received unregistered task using Celery with Django -