Deselecting all annotations
Is there a way to do that? if i remove all the annotations, and add new ones - selected one still appears. So is there a way to deselect the annotations before removing them?
3 Answers
-
Accepted Answer
Try
yourmapview.deselectAnnotation(annotationObject)whereyourmapviewis your map view and annotationObject is a reference to the annotation object (not index or title). -
…
-
problem solved… in the beginning:
var anotacii=new Array();in the loop:
anotacii.push(pin);on the end:
for(i=0;i<anotacii.length;i++){ mapview.deselectAnnotation(anotacii[i]); }