Proper way to add/remove OverlayItems

Cristian Vrabie

I'm a Java Developer at Seesmic and a great supporter of Java related technologies. In my free time I flirt with Android and JavaScript. I just love to discover and try new technologies, test gadgets and read good books.

You may also read...

  • Ravjan07

    it will not work if you remove all items

    public void doPopulate(){

    I resolve this by:
    public void insertPinpoint(OverlayItem item) {
    pinPoints.add(0, item);
    and i keep all the time first point wich will be last in that list.

  • Lukas

    Hello Cristian
    Thank you for the great post!
    Do you know how to set as an OnZoomListener for zooming by 2 finger-gestures on the map (not only for acting with the zoom controls )?

    have a nice day

    • Cristian Vrabie

      I might be mistaken but i think that they added that as default option in the latest versions of the API. You just need to turn on a flag.

  • Erik Andrén

    Hi Cristian and thanks for an interesting post.
    Have you ever experienced that the overlay items get skewed a number of pixels, but the drop shadows still remain in place when you display dialogs on top on your map view?

  • Adil

    Thanks! Useful stuff.

  • Thomas Kioko

    i have a question…how can one use quick action in the ontap method for the overlay…such that when u click on an overlay the quick action pops up

  • evelyne

    errata: MAX_PINS_PER_ZOOM is an array which contains the number of items to be display for the levels in between.