-
- 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 final 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 final classAnnotation.TextDisplayInfoThis 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 final classAnnotation.LayerLayer 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 UnitupdateFloatValue(String styleKey, Float value)Update a value for your Float parameter using the TSS style key abstract UnitupdateStringValue(String styleKey, String value)Update a value for your String parameter using the TSS style key abstract UnitupdateColor(String styleKey, Integer red, Integer green, Integer blue, Integer alpha)Update values for your color parameters using the TSS style key abstract UnitupdateState(String name, Boolean enableAnimation)Update the state of an annotation. abstract Annotation.TypegetType()This method is used to change the annotation type. abstract UnitsetType(Annotation.Type type)This method is used to change the annotation type. abstract Annotation.StylegetStyle()This method is used to set the annotation style. abstract UnitsetStyle(Annotation.Style style)This method is used to set the annotation style. abstract Annotation.TextDisplayInfogetDisplayText()abstract UnitsetDisplayText(Annotation.TextDisplayInfo displayText)abstract Annotation.LayergetLayer()abstract UnitsetLayer(Annotation.Layer layer)abstract LocationgetLocation()This method is used to change the anchor point of the current annotation. abstract UnitsetLocation(Location location)This method is used to change the anchor point of the current annotation. abstract DoublegetPriority()to set annotation priority When multiple icons are on the same layer the order of drawing is based on the priority. abstract UnitsetPriority(Double priority)to set annotation priority When multiple icons are on the same layer the order of drawing is based on the priority. abstract DoublegetIconX()Set horizontal offset from icon center to anchor point. abstract UnitsetIconX(Double iconX)Set horizontal offset from icon center to anchor point. abstract DoublegetIconY()Set vertical offset from icon center to anchor point. abstract UnitsetIconY(Double iconY)Set vertical offset from icon center to anchor point. abstract StringgetPopupText()This method returns the text associated with the current annotation. abstract UnitsetPopupText(String popupText)This method returns the text associated with the current annotation. abstract BundlegetExtraInfo()Get the annotation extra information abstract UnitsetExtraInfo(Bundle extraInfo)Get the annotation extra information abstract Annotation.UserGraphicgetUserGraphic()set the annotation UserGraphic graphic abstract UnitsetUserGraphic(Annotation.UserGraphic userGraphic)set the annotation UserGraphic graphic -
-
Method Detail
-
updateFloatValue
abstract Unit updateFloatValue(String styleKey, Float value)
Update a value for your Float parameter using the TSS style key
- Parameters:
styleKey- style key that you have in the TSS filevalue-value that will be updated
-
updateStringValue
abstract Unit updateStringValue(String styleKey, String value)
Update a value for your String parameter using the TSS style key
- Parameters:
styleKey- style key that you have in the TSS filevalue-value that will be updated
-
updateColor
abstract Unit updateColor(String styleKey, Integer red, Integer green, Integer blue, Integer alpha)
Update values for your color parameters using the TSS style key
- Parameters:
styleKey- style key that you have in the TSS filered- The red component of the color.green- The green component of the color.blue- The blue component of the color.alpha- The alpha component of the color.
-
updateState
abstract Unit updateState(String name, Boolean enableAnimation)
Update the state of an annotation. The provided state must be in the current TSS file
- Parameters:
name- string specifying the state to update to.enableAnimation-enable/disable animation.If true animation will be enabled, otherwise animation will be disabled.
-
getType
abstract Annotation.Type getType()
This method is used to change the annotation type.
-
setType
abstract Unit setType(Annotation.Type type)
This method is used to change the annotation type.
- Parameters:
type- a value of the Type Enum
-
getStyle
abstract Annotation.Style getStyle()
This method is used to set the annotation style.
-
setStyle
abstract Unit setStyle(Annotation.Style style)
This method is used to set the annotation style.
- Parameters:
style- a value of the Style Enum
-
getDisplayText
abstract Annotation.TextDisplayInfo getDisplayText()
This method is used to set the textual display string
-
setDisplayText
abstract Unit setDisplayText(Annotation.TextDisplayInfo displayText)
This method is used to set the textual display string
- Parameters:
displayText- annotation display text.
-
getLayer
abstract Annotation.Layer getLayer()
Get the annotation's layer
-
setLayer
abstract Unit setLayer(Annotation.Layer layer)
Get the annotation's layer
-
getLocation
abstract Location getLocation()
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.
-
setLocation
abstract Unit setLocation(Location location)
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:
location- the new location for the annotation in latLon format
-
getPriority
abstract Double getPriority()
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
-
setPriority
abstract Unit 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.
-
setIconX
abstract Unit setIconX(Double iconX)
Set horizontal offset from icon center to anchor point.
- Parameters:
iconX- 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.
-
setIconY
abstract Unit setIconY(Double iconY)
Set vertical offset from icon center to anchor point.
- Parameters:
iconY- 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.
-
getPopupText
abstract String getPopupText()
This method returns the text associated with the current annotation.
-
setPopupText
abstract Unit setPopupText(String popupText)
This method returns the text associated with the current annotation.
-
getExtraInfo
abstract Bundle getExtraInfo()
Get the annotation extra information
-
setExtraInfo
abstract Unit setExtraInfo(Bundle extraInfo)
Get the annotation extra information
-
getUserGraphic
abstract Annotation.UserGraphic getUserGraphic()
set the annotation UserGraphic graphic
-
setUserGraphic
abstract Unit setUserGraphic(Annotation.UserGraphic userGraphic)
set the annotation UserGraphic graphic
- Parameters:
userGraphic- the new User Graphic
-
-
-
-