Class Annotation<T extends com.trimblemaps.geojson.Geometry>
java.lang.Object
com.trimblemaps.mapsdk.plugins.annotation.Annotation<T>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.gson.JsonElementgetData()Get the arbitrary json object data of the annotation.Get the geometry of an annotation, type of geometry returned depends on the generic attribute.longgetId()Returns this annotation's internal ID.inthashCode()booleanReturns whether this annotation is draggable, meaning it can be dragged across the screen when touched and moved.voidsetData(com.google.gson.JsonElement jsonElement) Set the arbitrary json data of the annotation.voidsetDraggable(boolean draggable) Set whether this annotation should be draggable, meaning it can be dragged across the screen when touched and moved.voidsetGeometry(T geometry) Set the geometry of an annotation, geometry type depends on the generic attribute.toString()
-
Field Details
-
jsonObject
protected com.google.gson.JsonObject jsonObject -
geometry
-
-
Method Details
-
setGeometry
Set the geometry of an annotation, geometry type depends on the generic attribute.- Parameters:
geometry- an instance of a geometry type
-
getGeometry
Get the geometry of an annotation, type of geometry returned depends on the generic attribute.- Returns:
- the geometry of the annotation
- Throws:
IllegalStateException- if geometry hasn't been initialised
-
getId
public long getId()Returns this annotation's internal ID.- Returns:
- annotation's internal ID
-
isDraggable
public boolean isDraggable()Returns whether this annotation is draggable, meaning it can be dragged across the screen when touched and moved.- Returns:
- draggable when touched
-
setDraggable
public void setDraggable(boolean draggable) Set whether this annotation should be draggable, meaning it can be dragged across the screen when touched and moved.- Parameters:
draggable- should be draggable
-
setData
public void setData(@Nullable com.google.gson.JsonElement jsonElement) Set the arbitrary json data of the annotation.- Parameters:
jsonElement- the arbitrary json object data
-
getData
@Nullable public com.google.gson.JsonElement getData()Get the arbitrary json object data of the annotation.- Returns:
- the arbitrary json object data if set, else null
-
equals
-
hashCode
public int hashCode() -
toString
-