Package 

Interface Annotation

  • 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

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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() This method is used to get the textual display string
      abstract Unit setDisplayText(Annotation.TextDisplayInfo displayText) This method is used to get the textual display string
      abstract Annotation.Layer getLayer() Set the annotation's layer
      abstract Unit setLayer(Annotation.Layer layer) Set the annotation's layer
      abstract Location getLocation() This method is used to get the anchor point of the current location.
      abstract Unit setLocation(Location location) This method is used to get the anchor point of the current location.
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 file
        value -
        • value that will be updated

        Note: styleKey - here refers to the name of the variable inside the tss layer, which is used to pick different icons and positions for them
      • 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 file
        value -
        • value that will be updated

        Note: styleKey - here refers to the name of the variable inside the tss layer, which is used to pick different icons and positions for them
      • 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 file
        red - 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.

      • setType

         abstract Unit setType(Annotation.Type type)

        This method is used to change the annotation type.

        Parameters:
        type - a value of the Type Enum
      • setStyle

         abstract Unit setStyle(Annotation.Style style)

        This method is used to set the annotation style.

        Parameters:
        style - a value of the Style Enum
      • setLayer

         abstract Unit setLayer(Annotation.Layer layer)

        Set the annotation's layer

        Parameters:
        layer - the layer to associate with the annotation
      • getLocation

         abstract Location getLocation()

        This method is used to get the anchor point of the current location.

      • setLocation

         abstract Unit setLocation(Location location)

        This method is used to get the anchor point of the current location.

      • 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.
      • getIconX

         abstract Double getIconX()

        Set horizontal offset from icon center to anchor point.

      • 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.
      • getIconY

         abstract Double getIconY()

        Set vertical offset from icon center to anchor point.

      • 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