gpt4 book ai didi

iphone - 如何在 iphone 中使用蜂窝塔三角测量?

转载 作者:行者123 更新时间:2023-11-28 20:30:19 24 4
gpt4 key购买 nike

在我的应用中,我不想脱离定位服务。我想在 iphone 上使用手机信号塔三角测量获取坐标。

请告诉我该怎么做?

最佳答案

使用名为 startMonitoringSignificantLocationChanges 的 API。来自 Apple docs -

startMonitoringSignificantLocationChanges service offers a significant power savings and provides accuracy that is good enough for most applications. It uses the device’s cellular radio to determine the user’s location and report changes in that location, allowing the system to manage power usage much more aggressively than it could otherwise.

所以在代码中这就是它的样子 -

 self.locationManager     = [[[CLLocationManager alloc] init] autorelease];
locationManager.delegate = self;
[locationManager startMonitoringSignificantLocationChanges];

关于iphone - 如何在 iphone 中使用蜂窝塔三角测量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12402521/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com