Package 

Interface AnnotationFactory

  • All Implemented Interfaces:

    
    public interface AnnotationFactory
    
                        

    Public API for annotation factory.

    Obtain instances from the corresponding service factory after SDK initialization. Threading, lifecycle, and error handling are described on individual methods.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • 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 Annotation create(Context context, @DrawableRes() Integer resourceId, Location location) Create an annotation to be added to a MapView
      abstract Annotation create(Context context, Annotation.UserGraphic userGraphic, Location location) Create an annotation to be added to a MapView
      abstract Annotation create(Annotation.ExplicitStyle explicitStyle, Location location) Create an annotation with a specially designed explicit style.
      abstract Annotation create(POIAnnotationParams params) Create an annotation using a TSS style.
      abstract Annotation createRouteAnnotation(String routeID, String style) Create a route annotation with the given route ID and style.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • create

         abstract Annotation create(Context context, @DrawableRes() Integer resourceId, Location location)

        Create an annotation to be added to a MapView

        Parameters:
        context - Context object, usually of the hosting activity or fragment
        resourceId - resource id of the image to load
        location - The location where the annotation will be displayed
      • create

         abstract Annotation create(Context context, Annotation.UserGraphic userGraphic, Location location)

        Create an annotation to be added to a MapView

        Parameters:
        context - Context object, usually of the hosting activity or fragment
        userGraphic - the graphic representing the image to be used for the annotation.
        location - The location where the annotation will be displayed
      • create

         abstract Annotation create(Annotation.ExplicitStyle explicitStyle, Location location)

        Create an annotation with a specially designed explicit style. notice: other Annotation.Style won't take effect.

        Parameters:
        explicitStyle - a style of Annotation.ExplicitStyle, like HeavyCongestionBubble, LightCongestionBubble.
        location - The location where the annotation will be displayed
      • create

         abstract Annotation create(POIAnnotationParams params)

        Create an annotation using a TSS style. Delegates the control over graphics and text rendering to the engine.

        Parameters:
        params - params for creating annotations using TSS resources
      • createRouteAnnotation

         abstract Annotation createRouteAnnotation(String routeID, String style)

        Create a route annotation with the given route ID and style.

        Parameters:
        routeID - The ID of the route you want to create an annotation for.
        style - The style of the annotation.