Class MarkerLayer

java.lang.Object
org.oscim.layers.Layer
org.oscim.layers.marker.MarkerLayer
Direct Known Subclasses:
ItemizedLayer

public abstract class MarkerLayer extends Layer
Draws a list of MarkerInterface as markers to a map. The item with the lowest index is drawn as last and therefore the 'topmost' marker. It also gets checked for onTap first. This class is generic, because you then you get your custom item-class passed back in onTap(). << TODO
  • Field Details

  • Constructor Details

  • Method Details

    • createItem

      public abstract MarkerInterface createItem(int i)
      Method by which subclasses create the actual Items. This will only be called from populate() we'll cache them for later use.
    • size

      public abstract int size()
      The number of items in this overlay.
    • populate

      public final void populate()
      Utility method to perform all processing on a new ItemizedOverlay. Subclasses provide Items through the createItem(int) method. The subclass should call this as soon as it has data, before anything else gets called.
    • setFocus

      public void setFocus(MarkerInterface item)
      TODO If the given Item is found in the overlay, force it to be the current focus-bearer. Any registered {link ItemizedLayer#OnFocusChangeListener} will be notified. This does not move the map, so if the Item isn't already centered, the user may get confused. If the Item is not found, this is a no-op. You can also pass null to remove focus.
      Parameters:
      item -
    • getFocus

      public MarkerInterface getFocus()
      Returns:
      the currently-focused item, or null if no item is currently focused.
    • update

      public void update()