Package 

Interface AnnotationsController

  • All Implemented Interfaces:

    
    public interface AnnotationsController
    
                        

    Controls annotations behavior on the map view.

    Access from the map view controller registry after the view is ready.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum AnnotationsController.LayerAction

      Enumeration of layer action values used in public API payloads. Serialized using the numeric or string encoding defined by the analytics schema.

    • 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 AnnotationFactory factory() Get the factory to be used to create annotations
      abstract Unit add(List<Annotation> annotations) Add Annotations to MapView.
      abstract List<Annotation> current() Get current list of annotations in MapView
      abstract Unit update(List<Annotation> annotations) Update the annotations that have been added
      abstract Unit updateState(Annotation annotation, String state, Float transitionTime) Update the state of an annotation.
      abstract Unit remove(List<Annotation> annotations) Remove list of Annotations from MapView
      abstract Unit clear() Clear all annotations from the map.
      abstract Camera.Region region(List<Annotation> annotations) Get the region that encompasses the given annotations
      abstract Unit actionOnLayer(Annotation.Layer layer, AnnotationsController.LayerAction action) Commit and action on an entire layer (enable, disable, etc...
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • add

         abstract Unit add(List<Annotation> annotations)

        Add Annotations to MapView.

        Parameters:
        annotations - list of annotations you would like to add to map.
      • current

         abstract List<Annotation> current()

        Get current list of annotations in MapView

      • update

         abstract Unit update(List<Annotation> annotations)

        Update the annotations that have been added

        Parameters:
        annotations - list of annotations you would like to update.
      • updateState

         abstract Unit updateState(Annotation annotation, String state, Float transitionTime)

        Update the state of an annotation. The provided state must be in the current TSS file

        Parameters:
        annotation - the annotation whose state is being updated.
        state - string specifying the state to update to.
        transitionTime - the length of time to transition from one state to another.
      • remove

         abstract Unit remove(List<Annotation> annotations)

        Remove list of Annotations from MapView

        Parameters:
        annotations - list of annotations to remove from the map
      • clear

         abstract Unit clear()

        Clear all annotations from the map. Notes: this will clear all annotations added to this MapView. So if multiple model was adding annotation, they will be cleared too.

      • region

         abstract Camera.Region region(List<Annotation> annotations)

        Get the region that encompasses the given annotations

        Parameters:
        annotations - list of annotations want to show