0

I'm using the Google Maps Android API V2 and I set an amount of markers in it.

I need get all markers from a MapView (really one of them). There is any way to do this? How can I iterate over the markers in the map? How can I locate one determinated marker?

Thanks in advance.

Jose Manuel
  • 787
  • 2
  • 8
  • 19

1 Answers1

0

There is any way to do this?

Only if you have your own collection of markers.

How can I iterate over the markers in the map?

Iterate over your own collection of markers.

How can I locate one determinated marker?

Find it in your own collection of markers.

Maps V2 is largely a write-only interface for things like markers, polylines, and polygons. The data is not maintained in your process; rather, the data is sent via IPC over to the Google Play Services app. If you wish to use this data in the future, that is fine, but you need to hold onto it yourself in addition to supplying it to your GoogleMap.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491