-
- 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 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 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 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 Annotation.Type
getType()
This method is used to get the annotation type. abstract void
setType(@NonNull() Annotation.Type type)
This method is used to change the annotation type. abstract Annotation.Style
getStyle()
This method is used to get the annotation style. abstract void
setStyle(@NonNull() Annotation.Style style)
This method is used to set the annotation style. abstract Annotation.TextDisplayInfo
getDisplayText()
* This method is used to get the textual display string abstract void
setDisplayText(@Nullable() Annotation.TextDisplayInfo text)
* This method is used to set the textual display string abstract void
setLayer(@NonNull() Annotation.Layer layer)
* Set the annotation's layer abstract Annotation.Layer
getLayer()
* Get the annotation's layer abstract Location
getLocation()
This method is used to get the anchor point of the current location. abstract void
setLocation(@NonNull() Location latLon)
This method is used to change the anchor point of the current annotation. 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. abstract double
getPriority()
Get the annotation's priority abstract void
setIconX(double offsetX)
Set horizontal offset from icon center to anchor point. abstract double
getIconX()
Get horizontal offset from icon center to anchor point. abstract void
setIconY(double offsetY)
Set vertical offset from icon center to anchor point. abstract double
getIconY()
Get vertical offset from icon center to anchor point abstract String
getPopupText()
This method returns the text associated with the current annotation. abstract void
setPopupText(@Nullable() String popupText)
This method associates to the current annotation a text that could be displayed when selected. abstract Bundle
getExtraInfo()
Get the annotation extra information abstract void
setExtraInfo(@Nullable() Bundle extraInfo)
Set the annotation extra information abstract void
setUserGraphic(@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
-
-
-
-