Closed GoogleCodeExporter closed 9 years ago
Yes, I think this is the reason. Annotations are stored in both mStringXY and
mAnnotations variables. Whenever clearAnnotations() is called only mStringsXY
are cleared, while call to getAnnotationCount() returns size of mAnnotations.
Hence adding annotations and then clearing them breaks everything.
The work around is to call removeAnnotation(idx) because it removes annotations
from both lists.
Original comment by etsi...@gmail.com
on 30 Jul 2014 at 9:15
Here is how I do it:
while (points.getAnnotationCount() > 0)
{
points.removeAnnotation(points.getAnnotationCount()-1);
}
Original comment by etsi...@gmail.com
on 30 Jul 2014 at 9:36
The fix is easier; you need to add
mAnnotations.clear()
in clearAnnotions()
public synchronized void clearAnnotations() {
mAnnotations.clear();
mStringXY.clear();
}
Original comment by verna...@gmail.com
on 7 Aug 2014 at 11:02
Original comment by dandrome...@gmail.com
on 16 Sep 2014 at 7:22
Original issue reported on code.google.com by
mccuthbe...@gmail.com
on 20 Jan 2014 at 11:14