-
- All Implemented Interfaces:
public interface AnnotationMain class for rendering the annotations on the map Copyright reserved by telenav 2020.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAnnotation.UserGraphicA passed in graphic resource that always resolves to a bitmap Derived versions or named constructors can be written to take in different formats Design not final
public enumAnnotation.TypeThe map engine supports several annotation types. They are defined by the Type Enum as follows
public enumAnnotation.StyleThe Enum define the annotation styles. The detailed information is given below.
public enumAnnotation.ExplicitStyleThe Enum define the explicit annotation styles. The detailed information is given below.
public classAnnotation.TextDisplayInfo* This class is used to set textual display information. It also includes offsets to control where the text will be displayed in relation to the annotation
public classAnnotation.Layer* Layer enum for operating on annotations by layer (show, hide, etc...) Clients may create their own layers by using numbers from UserDefinedFirst to UserDefinedLast
-
Method Summary
Modifier and Type Method Description abstract Annotation.TypegetType()This method is used to get the annotation type. abstract voidsetType(@NonNull() Annotation.Type type)This method is used to change the annotation type. abstract Annotation.StylegetStyle()This method is used to get the annotation style. abstract voidsetStyle(@NonNull() Annotation.Style style)This method is used to set the annotation style. abstract Annotation.TextDisplayInfogetDisplayText()* This method is used to get the textual display string abstract voidsetDisplayText(@Nullable() Annotation.TextDisplayInfo text)* This method is used to set the textual display string abstract voidsetLayer(@NonNull() Annotation.Layer layer)* Set the annotation's layer abstract Annotation.LayergetLayer()* Get the annotation's layer abstract LocationgetLocation()This method is used to get the anchor point of the current location. abstract voidsetLocation(@NonNull() Location latLon)This method is used to change the anchor point of the current annotation. abstract voidsetPriority(double priority)to set annotation priority When multiple icons are on the same layer the order of drawing is based on the priority. abstract doublegetPriority()Get the annotation's priority abstract voidsetIconX(double offsetX)Set horizontal offset from icon center to anchor point. abstract doublegetIconX()Get horizontal offset from icon center to anchor point. abstract voidsetIconY(double offsetY)Set vertical offset from icon center to anchor point. abstract doublegetIconY()Get vertical offset from icon center to anchor point abstract StringgetPopupText()This method returns the text associated with the current annotation. abstract voidsetPopupText(@Nullable() String popupText)This method associates to the current annotation a text that could be displayed when selected. abstract BundlegetExtraInfo()Get the annotation extra information abstract voidsetExtraInfo(@Nullable() Bundle extraInfo)Set the annotation extra information abstract voidsetUserGraphic(@NonNull() Annotation.UserGraphic graphic)set the annotation UserGraphic graphic -
-
Method Detail
-
getType
@NonNull() abstract Annotation.Type getType()
This method is used to get the annotation type.
-
setType
abstract void setType(@NonNull() Annotation.Type type)
This method is used to change the annotation type.
- Parameters:
type- a value of the Type Enum
-
getStyle
@NonNull() abstract Annotation.Style getStyle()
This method is used to get the annotation style.
-
setStyle
abstract void setStyle(@NonNull() Annotation.Style style)
This method is used to set the annotation style.
- Parameters:
style- a value of the Style Enum
-
getDisplayText
@Nullable() abstract Annotation.TextDisplayInfo getDisplayText()
* This method is used to get the textual display string
-
setDisplayText
abstract void setDisplayText(@Nullable() Annotation.TextDisplayInfo text)
* This method is used to set the textual display string
- Parameters:
text- annotation display text.
-
setLayer
abstract void setLayer(@NonNull() Annotation.Layer layer)
* Set the annotation's layer
- Parameters:
layer- the layer to associate with the annotation
-
getLayer
@NonNull() abstract Annotation.Layer getLayer()
* Get the annotation's layer
-
getLocation
@NonNull() abstract Location getLocation()
This method is used to get the anchor point of the current location.
-
setLocation
abstract void setLocation(@NonNull() Location latLon)
This method is used to change the anchor point of the current annotation.
Note: You cannot change this configuration after adding the annotation to mapView.
- Parameters:
latLon- the new location for the annotation in latLon format
-
setPriority
abstract void setPriority(double priority)
to set annotation priority When multiple icons are on the same layer the order of drawing is based on the priority. Also higher priority wins when collisions are enabled
- Parameters:
priority- the priority to set.
-
getPriority
abstract double getPriority()
Get the annotation's priority
-
setIconX
abstract void setIconX(double offsetX)
Set horizontal offset from icon center to anchor point.
- Parameters:
offsetX- horizontal offset from icon center to anchor point, the unit is width of icon, if offsetX <0, the icon is shifted to the left, if >0, the icon is shifted to the right.
-
getIconX
abstract double getIconX()
Get horizontal offset from icon center to anchor point.
-
setIconY
abstract void setIconY(double offsetY)
Set vertical offset from icon center to anchor point.
- Parameters:
offsetY- vertical offset of icon center to anchor point, the unit is height of icon, if offsetY <0, the icon is shifted to the up, if offsetY >0, the icon is shifted to the down.
-
getIconY
abstract double getIconY()
Get vertical offset from icon center to anchor point
-
getPopupText
@Nullable() abstract String getPopupText()
This method returns the text associated with the current annotation.
-
setPopupText
abstract void setPopupText(@Nullable() String popupText)
This method associates to the current annotation a text that could be displayed when selected.
- Parameters:
popupText- text to associate with the current annotation
-
getExtraInfo
@Nullable() abstract Bundle getExtraInfo()
Get the annotation extra information
-
setExtraInfo
abstract void setExtraInfo(@Nullable() Bundle extraInfo)
Set the annotation extra information
- Parameters:
extraInfo- the annotation extra information
-
setUserGraphic
abstract void setUserGraphic(@NonNull() Annotation.UserGraphic graphic)
set the annotation UserGraphic graphic
- Parameters:
graphic- the new User Graphic
-
-
-
-