iOS CoreLocation Altitude

后端 未结 4 494
终归单人心
终归单人心 2020-12-31 11:36

Prior to iOS 4.0, CoreLocation was reporting altitude correctly, now it always reports as 0 ft.

-(void)locationManager:(CLLocationManager *)mana         


        
4条回答
  •  天涯浪人
    2020-12-31 12:27

    Two things you could try. First of all, try setting the location manager's desiredAccuracy to kCLLocationAccuracyBest.

    If that doesn't work, try removing [manager stopUpdatingLocation];, and put a NSLog in the didUpdateToLocation with the altitude. Sometimes it needs to narrow down for a bit before it displays the altitude.

提交回复
热议问题