public abstract class MapObjectStyle extends Object implements Parcelable
Marker
styling on the map. A Marker is a small icon displayed on the map to indicate a location.
MapObjectStyle determines the image displayed to indicate the marker, and its display orientation relative to the map (see below).
Currently there are 2 derived classes of MapObjectStyle:
- CircleStyle displays the marker as a simple circle
- MapImageStyle displays the marker as a user-defined bitmap
Markers can be displayed in one of 2 modes:
Flat - The marker is drawn "flat" on the map, like a sticker stuck on the map. In this case, when the map is tilted,
the marker is tilted too (and therefore the marker image is distorted according to the laws of perspective).
In the Flat display mode, the Anchor value determines where the marker is displayed, relative to the location on the map
(above, below, to the right, etc. - see Anchor class.)
Non-flat - Depending on the Anchor position, the marker is displayed in one of 2 ways:
Anchor=TOP - The marker is displayed like a small billboard stuck into the map (orthogonal to the map).
Anchor=CENTER - The marker is displayed as parallel to the map, but hovering above it, as if lifted by a pin stuck through its center.
In this case, the marker is not tilted when the map is tilted. This display mode might be preferred for
small marker icons which might be unreadable if distorted by tilt.Modifier and Type | Class and Description |
---|---|
static class |
MapObjectStyle.Builder<StyleClass extends MapObjectStyle.Builder> |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
MapObjectStyle() |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(Marker marker)
Apply this styling to the given marker.
|
abstract Anchor |
getAnchor()
How to position the map object relative to the given point (above the point, below it, to the left, etc.)
|
abstract boolean |
getClickable()
Sets if the Marker will be clickable or not.
|
abstract Point |
getOffset()
Map object offset in screen-space points, relative to the object's display point (MapObjectBase.point).
|
abstract boolean |
isFlat()
Whether the marker is drawn flat on the map (so that when the map is tilted, the marker is tilted too).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public abstract boolean isFlat()
public void applyTo(Marker marker)
marker
- the marker on which to apply this stylingpublic abstract Anchor getAnchor()
public abstract Point getOffset()
public abstract boolean getClickable()