同一位置坐标中的多个注释( MKAnnotationView ) [英] Multiple Annotations ( MKAnnotationView ) in the same location Coordinates

查看:39
本文介绍了同一位置坐标中的多个注释( MKAnnotationView )的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户触摸,我正在尝试实现注释分组和动画.

Hi I am trying to implement Annotations grouping and animation if the user touch.

我确实查看了不同的集群库解决方案,但这对我不起作用,因为我在同一坐标中有多个注释.

I did look a the different cluster Library solution but this wont work for my because I have multiple Annotations in the same Coordinates.

这就是我想做的

1- 我确定同一位置(坐标)中有多个注释的位置?如何实现这一点?找到相同坐标下的注解,做一个新的组注解?

1- I identify where there are multiple Annotations in the same place (Coordinates)? how can implement this ? find the annotations in the same coordinates and make a new group annotation ?

2- 更改注释的颜色(让用户知道)我可以用这个方法做到这一点-(MKAnnotationView*)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation;

2- change the colour of that Annotation (to let the user know) I can do this on this method -(MKAnnotationView*)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation;

3- 如果用户触摸该组中的注释,注释将围绕他们的位置移动一圈.

3- if the user touch the annotations in that group , annotations will move in a circle around their location.

到目前为止,我在地图上的所有注释都有一些非常暗的阴影.

So far I have all my annotation on the map some have a very dark shadow.

我现在想专注于第一个任务 - 分组

I want to focus in the first task now - grouping

我不是在要求我能做的代码示例,我只是需要帮助弄清楚使用什么方法来实现任务.

I am not asking for code example I can do that I just need help figuring out what methods to use to implement the task .

感谢您的帮助.

推荐答案

我最终从 StormID 实现了这段代码

I ended up implementing this code from StormID

同时处理 MKMapView 注释引脚坐标

我必须进行一些更改,但效果很好.

I have to make some changes but it works great.

这篇关于同一位置坐标中的多个注释( MKAnnotationView )的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆