-
- All Implemented Interfaces:
public interface Annotation
Main 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 class
Annotation.UserGraphic
A 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 enum
Annotation.Type
The map engine supports several annotation types. They are defined by the Type Enum as follows
public enum
Annotation.Style
The Enum define the annotation styles. The detailed information is given below.
public enum
Annotation.ExplicitStyle
The Enum define the explicit annotation styles. The detailed information is given below.
public final class
Annotation.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 final class
Annotation.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 Unit
updateFloatValue(String styleKey, Float value)
Update a value for your Float parameter using the TSS style key abstract Unit
updateStringValue(String styleKey, String value)
Update a value for your String parameter using the TSS style key abstract Unit
updateColor(String styleKey, Integer red, Integer green, Integer blue, Integer alpha)
Update values for your color parameters using the TSS style key abstract Unit
updateState(String name, Boolean enableAnimation)
Update the state of an annotation. abstract Annotation.Type
getType()
This method is used to change the annotation type. abstract Unit
setType(Annotation.Type type)
This method is used to change the annotation type. abstract Annotation.Style
getStyle()
This method is used to set the annotation style. abstract Unit
setStyle(Annotation.Style style)
This method is used to set the annotation style. abstract Annotation.TextDisplayInfo
getDisplayText()
abstract Unit
setDisplayText(Annotation.TextDisplayInfo displayText)
abstract Annotation.Layer
getLayer()
abstract Unit
setLayer(Annotation.Layer layer)
abstract Location
getLocation()
This method is used to change the anchor point of the current annotation. abstract Unit
setLocation(Location location)
This method is used to change the anchor point of the current annotation. abstract Double
getPriority()
to set annotation priority When multiple icons are on the same layer the order of drawing is based on the priority. 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. abstract Double
getIconX()
Set horizontal offset from icon center to anchor point. abstract Unit
setIconX(Double iconX)
Set horizontal offset from icon center to anchor point. abstract Double
getIconY()
Set vertical offset from icon center to anchor point. abstract Unit
setIconY(Double iconY)
Set vertical offset from icon center to anchor point. abstract String
getPopupText()
This method returns the text associated with the current annotation. abstract Unit
setPopupText(String popupText)
This method returns the text associated with the current annotation. abstract Bundle
getExtraInfo()
Get the annotation extra information abstract Unit
setExtraInfo(Bundle extraInfo)
Get the annotation extra information abstract Annotation.UserGraphic
getUserGraphic()
set the annotation UserGraphic graphic abstract Unit
setUserGraphic(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
-
-
-
-