public final class Marker extends Feature<Marker>
Marker feature. The Marker draws icon at given point
Usage example:
Marker marker = new Marker(this, "My Marker").setCoordinate(point)
MapController.putFeature(marker);
Copyright (c) 2017 Nexusgeographics All rights reserved.
MapController,
MarkerStyle,
Feature| Constructor and Description |
|---|
Marker(android.content.Context context)
Instantiates a new Marker.
|
Marker(android.content.Context context,
java.lang.String name)
Instantiates a new Marker with name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
LatLng |
getCoordinate()
Gets coordinate.
|
MarkerStyle |
getStyle()
Gets style.
|
int |
hashCode() |
Marker |
setCoordinate(LatLng coordinate)
Sets coordinates and update Marker
|
Marker |
setCoordinate(LatLng coordinate,
int duration)
Sets coordinates and update Marker with animation
|
Marker |
setDrawable(android.graphics.drawable.Drawable drawable)
Sets Drawable to current MarkerStyle and update Marker
|
Marker |
setDrawableId(int drawableId)
Sets DrawableId to current MarkerStyle and update Marker
|
Marker |
setStyle(MarkerStyle style)
Sets new Style and update Marker
|
java.lang.String |
toString() |
compareTo, getContext, getId, getInfo, getName, isCreated, remove, setInfoaddObserver, removeObserverpublic Marker(@NonNull
android.content.Context context)
context - the contextpublic Marker(@NonNull
android.content.Context context,
@NonNull
java.lang.String name)
context - the contextname - the feature namepublic Marker setCoordinate(@NonNull LatLng coordinate)
coordinate - Coordinatespublic Marker setCoordinate(@NonNull LatLng coordinate, int duration)
coordinate - Coordinatesduration - duration in miliseconspublic LatLng getCoordinate()
public Marker setStyle(@NonNull MarkerStyle style)
style - MarkerStylepublic MarkerStyle getStyle()
public Marker setDrawable(@Nullable android.graphics.drawable.Drawable drawable)
drawable - Drawablepublic Marker setDrawableId(@Nullable @DrawableRes int drawableId)
drawableId - int