public final class Label extends Feature<Label>
Label feature. The Label draws text label at a given point. Usage example:
Label label = new Label(context, "My Label").setText("My label").setCoordinate(coordinate);
MapController.putFeature(label);
Copyright (c) 2017 Nexusgeographics All rights reserved.
MapController
,
LabelStyle
,
Feature
Constructor and Description |
---|
Label(android.content.Context context)
Instantiates a new Label.
|
Label(android.content.Context context,
java.lang.String name)
Instantiates a new Label.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
LatLng |
getCoordinate()
Gets coordinate.
|
LabelStyle |
getStyle()
Gets style.
|
java.lang.String |
getText()
Gets text.
|
int |
hashCode() |
Label |
setCoordinate(LatLng coordinate)
Sets coordinate.
|
Label |
setCoordinate(LatLng coordinate,
int duration)
Sets coordinate.
|
Label |
setStyle(LabelStyle style)
Sets style.
|
Label |
setText(java.lang.String text)
Sets text.
|
java.lang.String |
toString() |
compareTo, getContext, getId, getInfo, getName, isCreated, remove, setInfo
addObserver, removeObserver
public Label(@NonNull android.content.Context context)
context
- the contextpublic Label(@NonNull android.content.Context context, @NonNull java.lang.String name)
context
- the contextname
- the namepublic Label setCoordinate(@NonNull LatLng coordinate)
coordinate
- the coordinatepublic Label setCoordinate(@NonNull LatLng coordinate, int duration)
coordinate
- the coordinateduration
- the durationpublic LatLng getCoordinate()
public Label setText(java.lang.String text)
text
- the textpublic java.lang.String getText()
public Label setStyle(@NonNull LabelStyle style)
style
- the stylepublic LabelStyle getStyle()