当前位置的 iPhone mapKit 注释

发布于 2024-09-03 19:45:08 字数 397 浏览 0 评论 0原文

我目前正在努力处理注释。我怎样才能阻止蓝色 GPS 点的 AnnotationLable。 (这是一张图片

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(MKAnnotation *) annotation{


 if (annotation == mapView.userLocation) { 
  return nil;
 }

上面的功能不起作用,我意识到我可以不要比较两个坐标。

欢迎任何提示。西蒙

Im currently strugglung with annotations. how can i prevent the AnnotationLable for the blue GPS-point. (Here is an Image)

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(MKAnnotation *) annotation{


 if (annotation == mapView.userLocation) { 
  return nil;
 }

the function above isnt working, and i realized that i can't compare two coordinates.

Any hint is welcome. Simon

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

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

发布评论

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

评论(1

忆依然 2024-09-10 19:45:08

您正在将注释与 if 中的位置进行比较。

您是否出于某种原因试图抑制当前位置注释?与地图套件通用的UI,一致性有助于用户理解蓝点。

You are comparing an annotation to a location in your if.

Are you trying to supress the current location annotation for a reason? It is common UI with map kit and the consistency helps users understand the blue dot.

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