简体   繁体   English

目标C-成效

[英]Objective-C - Performance

What is the performance impact of using GPS (CoreLocation)? 使用GPS(CoreLocation)对性能有何影响?

I have this question for the following problem I am facing: 对于以下问题,我有这个问题:

I'm developing an application, with google maps API, that display the current position of the device and other markers next to it. 我正在开发一个使用google maps API的应用程序,该应用程序可显示设备的当前位置以及旁边的其他标记。 At the marker touch event, it will be forwarded to another screen. 在标记触摸事件中,它将被转发到另一个屏幕。 So far it's all right. 到目前为止,还好。

The Problem: In all events that opens another screen (only from this screen with the map) there is a very long delay (reaching up to 1 minute) to proceed to the next screen. 问题:在所有事件中打开另一个屏幕(仅从带有地图的该屏幕),到下一个屏幕的延迟很长(最长1分钟)。 I've tried stop update the location but without success. 我尝试停止更新位置,但是没有成功。

I have posted a question about this problem with code in this link 我在此链接中用代码发布了有关此问题的问题

  • I am using an iPhone 4S; 我正在使用iPhone 4S;
  • iOS 7.1.2; iOS 7.1.2;
  • Google Maps (1.8.1); 谷歌地图(1.8.1);
  • Xcode 5; Xcode 5;

I already tried using MKMapView. 我已经尝试使用MKMapView。 However the problem remains. 但是问题仍然存在。

In devices such as iPhone 5 (simulator) and iPad (real device) this delay does not exist. 在iPhone 5(模拟器)和iPad(真实设备)等设备中,此延迟不存在。

Ok i have the same problems when i test googleMaps API. 好的,我在测试googleMaps API时遇到同样的问题。 I look like apple use a other triangulation method then Google, so we have a lot of extra operations to calculate your position. 我看起来像苹果公司使用的是Google以外的其他三角剖分方法,因此我们还有很多额外的操作来计算您的排名。 after same days of work i have switch to MKMapView. 经过同样的工作,我已经切换到MKMapView。 The Info do search for you will find under the Object type MKPlacemark 信息搜索将在对象类型MKPlacemark下找到

After much research and implementation found what was causing. 经过大量研究和实施,找到了造成问题的原因。

Solution: 解:

When we add the Google Maps framework to our project it creates a reference to framework automatically in Build Settings on Framework search paths . 当我们将Google Maps框架添加到我们的项目时,它会在 框架”搜索路径上的“ 构建设置”中自动创建对框架的引用。 When we exclude the framework he does not remove automatically this reference. 当我们排除框架时,他不会自动删除此引用。

Turns out I came across references the old version of the framework that was using. 原来,我遇到了引用所使用的框架的旧版本 I removed this reference and it worked perfectly. 删除了参考 ,它运行良好。

Solution on this link 此链接上的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM