Creates a new MarkerManager that will show/hide markers on a map.

Constructors

Properties

shown: boolean
shownMarkers: number

Methods

  • Add a single marker to the map.

    Parameters

    • marker: Marker

      The marker to add.

    • minZoom: number

      The minimum zoom level to display the marker.

    • maxZoom: number

      The maximum zoom level to display the marker.

    Returns void

  • Add many markers at once. Does not actually update the map, just the internal grid.

    Parameters

    • markers: Marker[]

      The markers to add.

    • minZoom: number

      The minimum zoom level to display the markers.

    • maxZoom: number

      The maximum zoom level to display the markers.

    Returns void

  • Removes all markers in the manager, and removes any visible markers from the map.

    Returns void

  • Returns a marker given latitude, longitude and zoom. If the marker does not exist, the method will return a new marker. If a new marker is created, it will NOT be added to the manager.

    Parameters

    • lat: number

      the latitude of a marker.

    • lng: number

      the longitude of a marker.

    • zoom: number

      the zoom level

    Returns Marker

    marker - the marker found at lat and lng

  • Calculates the total number of markers potentially visible at a given zoom level.

    Parameters

    • zoom: number

      The zoom level to check.

    Returns number

  • Returns true if the manager is hidden. Otherwise returns false.

    Returns boolean

    Hidden

  • Refresh forces the marker-manager into a good state.

    1. If never before initialized, shows all the markers.
    2. If previously initialized, removes and re-adds all markers.

    Returns void

  • Removes marker from the manager and from the map (if it's currently visible).

    Parameters

    • marker: Marker

      The marker to delete.

    Returns void

  • Initializes MarkerManager arrays for all zoom levels Called by constructor and by clearAllMarkers

    Returns void

  • Is this layer visible?

    Returns visibility setting

    Returns boolean

    Visible

MMNEPVFCICPMFPCPTTAAATR