cyrilmottier / Polaris

A library greatly enhancing the features of the Google Maps external library: Effortless map annotating, gesture support, map callout support, built-in “user tracking” mode, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clearing annotation

adek opened this issue · comments

I'm trying to use Polaris im my app. I've got problem with clearing markers.
The only thing is not working for me at the moment - clearing markers.

I'm using annotations.clear() (I'm using names from your sample).
I think there is small bug here.

annotations.clear() is only removing markers (without tooltips).

Let me show you this on some screens. This is my app. I'm showing some locations for my car (it works great).

Locations: https://dl.dropbox.com/u/6838779/Screenshot_2012-10-22-15-42-26.png

I'm trying to reload new annotations and markers for other car. It works, markers are reloaded but previous annotation is still on the screen.

See this: https://dl.dropbox.com/u/6838779/Screenshot_2012-10-22-15-39-40.png (this is view for other empty car).

After setting an array of annotations you should not modify it (Polaris doesn't deep copy annotations). If you want to clear the PolarisMapView of all annotations simply call setAnnotations(null)

Tested in 1.0.1
Now it works great. I didn't change my code. But I'll add setAnnotation(null) also.