iPod touch 报告位置不正确

发布于 2024-12-03 12:25:04 字数 1017 浏览 2 评论 0原文

我借了朋友的第一代 iPod touch 来测试我的应用程序。我将操作系统升级到iOS 3.1.3。

我一直在关注大书呆子牧场书,并试图获取要在日志中显示的位置,但它位于视图而不是应用程序委托内。

报告了位置,但由于某种原因,它给出了她的地址,距离超过 300 英里......

单独的地图应用程序报告它无法确定我的位置

我打开和关闭了地理定位服务,我只能找到列出的家庭网络,所以我无法让设备忘记她的网络。

这是我正在使用的代码:

- (void)viewDidLoad
{
    [super viewDidLoad];

    locationManager = [[CLLocationManager alloc] init];

    [locationManager setDelegate:self];

    [locationManager setDistanceFilter:kCLDistanceFilterNone];

    [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];

    [locationManager startUpdatingLocation]; 
}




-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
   NSLog(@"%@", newLocation);
}

我做错了什么?

编辑:我连接到距她的家庭网络 300 英里的家庭网络,

日志结果也是:

 <anumber,anumber>+/- 144.27m (speed -1.00 mps / course -1.00) @ 2009-06-28 17:58:08 +0100

似乎认为这是 2009 年...

谢谢大家

I have borrowed my friend's first gen iPod touch to test my app on. I upgraded the OS to iOS 3.1.3.

I have been following the big nerd ranch book and am trying to get the location to display in the log, but it's inside a view rather than the app delegate.

The location is reported but for some reason it gives her address, over 300 miles away....

The separate maps app reports that it cannot determine my location

I turned the geolocation services on and off and I can only find my home network listed so I can't make the device forget her network.

Here is the code i am using:

- (void)viewDidLoad
{
    [super viewDidLoad];

    locationManager = [[CLLocationManager alloc] init];

    [locationManager setDelegate:self];

    [locationManager setDistanceFilter:kCLDistanceFilterNone];

    [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];

    [locationManager startUpdatingLocation]; 
}




-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
   NSLog(@"%@", newLocation);
}

What am I doing wrong?

EDIT: I am connected to my home network 300 miles from hers

also the log result is:

 <anumber,anumber>+/- 144.27m (speed -1.00 mps / course -1.00) @ 2009-06-28 17:58:08 +0100

It seems to think it is 2009...

thanks everyone

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

孤独岁月 2024-12-10 12:25:04

看起来它正在使用缓存的位置,而在您现在所在的位置,它无法获取位置修复。尝试在有大量 WiFi 的地方(城市/大城市郊区)再次测试。另外,请检查是否可以在地图应用程序中找到位置。

Looks like it's using a cached location, and in the place you are now it can't get a location fix. Try testing it again in a place with lots of WiFi (a city/big suburb). Also, check to see if you can find a location in the maps app.

愿与i 2024-12-10 12:25:04

好吧,没有什么问题,iPod touch 没有 GPS 芯片。它使用 WiFi ESSID 的三角测量来确定其位置。

需要网络连接才能正确执行此操作。

Well there is nothing wrong, the iPod touch does not have a GPS chip. It uses triangulation of WiFi ESSID to vindt it's location.

It will need a network connection to do this correctly.

不乱于心 2024-12-10 12:25:04

有一次,WiFi 路由器上的时区设置不正确,iPod 上的位置信息也出现了混乱。

检查您的路由器设置。

There was this one time when the timezone on the WiFi router was set incorrectly and that kind of screwed up location info on iPods.

Check your router settings.

蓝戈者 2024-12-10 12:25:04

你有 iPhone 吗?

  • 确保 GPS 已打开(运行地图一段时间,蓝点周围有一个小精度圆圈)。
  • 确保它可以看到您的 WiFi 网络(加入它)。

也许也可以用另一部 iPhone 尝试一下。

将设备与 iTunes 同步,并希望这些 iPhone 在不久的将来的某个时间更新 Apple 的位置/ESSID 数据库:)

Do you have an iPhone?

  • Make sure the GPS is on (run maps for a bit, small accuracy circle around the blue dot).
  • Make sure it can see your WiFi network (join it).

Maybe try this with another iPhone also.

Sync the devices with iTunes, and hope that Apple's location/ESSID database is updated by those iPhones at some time in the near future :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文