简体   繁体   English

地图上显示了错误的注释视图

[英]Wrong annotation views being displayed on the map

I am inserting a new kind of annotations and, differently from the previous ones, they behave crazily. 我要插入一种新的注释,并且与以前的注释不同,它们的行为疯狂。 When the map of an area is shown, the delegate is passed annotation belonging to a far away zone, reporting their own features. 当显示区域的地图时,将向代表传递属于一个遥远区域的注释,以报告其自身的功能。 Yet they appear exactly in the positions in which the right annotations should appear! 但是它们恰好出现在应显示正确注释的位置! This happens 90% of the times with the rest being the correct annotations, and the annotations being displayed always belong to a strict subset of the available ones. 这发生了90%的时间,其余的都是正确的注释,并且所显示的注释始终属于可用注释的严格子集。

What could it be to produce this weird behavior and how to solve it? 产生这种奇怪行为的原因是什么?如何解决?

The problem was I used a static identifier as suggested quite everywhere. 问题是我在所有地方都使用了一个静态标识符。 Once I used a string with an identifier dependent on the annotation, everything got sorted out. 一旦我使用了带有依赖于注释的标识符的字符串,所有内容就会被整理出来。

实际上,我必须为每个注释使用一个标识符:太糟糕了,它们很多,但是它们带来了不同的信息,所以我不能使它们全部相同。

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

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