Package org.oscim.layers.marker
Class MarkerLayer
java.lang.Object
org.oscim.layers.Layer
org.oscim.layers.marker.MarkerLayer
- Direct Known Subclasses:
ItemizedLayer
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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTODO Interface definition for overlays that contain items that can be snapped to (for example, when the user invokes a zoom, this could be called allowing the user to snap the zoom to an interesting point.)Nested classes/interfaces inherited from class org.oscim.layers.Layer
Layer.EnableHandler -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMarkerLayer(Map map, MarkerRendererFactory markerRendererFactory) MarkerLayer(Map map, MarkerSymbol defaultSymbol) -
Method Summary
Modifier and TypeMethodDescriptionabstract MarkerInterfacecreateItem(int i) Method by which subclasses create the actual Items.getFocus()final voidpopulate()Utility method to perform all processing on a new ItemizedOverlay.voidsetFocus(MarkerInterface item) TODO If the given Item is found in the overlay, force it to be the current focus-bearer.abstract intsize()The number of items in this overlay.voidupdate()Methods inherited from class org.oscim.layers.Layer
getRenderer, isEnabled, map, onDetach, setEnabled, setEnableHandler
-
Field Details
-
mMarkerRenderer
-
mFocusedItem
-
-
Constructor Details
-
MarkerLayer
-
MarkerLayer
-
-
Method Details
-
createItem
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
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
- Returns:
- the currently-focused item, or null if no item is currently focused.
-
update
public void update()
-