Class StackedMapsExperimental

API for showing multiple maps involved in a Journey as a vertical stack.

Hierarchy

  • StackedMaps

Properties

disable: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Experimental

      Disable Stacked Maps and zoom in to the current map. Stacked Maps state will become INACTIVE.

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      mapView.StackedMaps.disable();
      
enable: ((opts?) => Promise<void>)

Type declaration

    • (opts?): Promise<void>
    • Experimental

      Enable Stacked Maps. A Journey must be drawn beforehand or this method will fail. Use showOverview to expand the maps vertically after enabling.

      Upon enabling, map state will become STACKED and Stacked Maps state will become ACTIVE.

      Parameters

      • Optional opts: {
            verticalDistanceBetweenMaps?: number;
        }
        • Optional verticalDistanceBetweenMaps?: number

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      // Create a Journey
      const startLocation = mapView.venue.locations.find(...);
      const endLocation = mapView.venue.locations.find(...);
      mapView.Journey.draw(startLocation.directionsTo(endLocation));

      // Enable and show Stacked Maps Overview
      mapView.StackedMaps.enable({
      verticalDistanceBetweenMaps: 150
      });
      mapView.StackedMaps.showOverview();
scrollToMap: ((map) => Promise<void>)

Type declaration

    • (map): Promise<void>
    • Experimental

      Scroll the camera to a specific map in OVERVIEW state.

      Parameters

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      // Zoom into a clicked map if Stacked Maps is in Overview state
      mapView.on(E_SDK_EVENT.CLICK, ({ maps }) => {
      if (maps.length <= 0) return;
      if (mapView.StackedMaps.state === STACKED_MAPS_STATE.OVERVIEW) {
      mapView.StackedMaps.scrollToMap(maps[0]);
      }
      });
showOverview: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Experimental

      Expand the maps in the current Journey vertically and add vertical paths between connections. Stacked Maps must be enabled beforehand and state will become OVERVIEW.

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      mapView.Journey.draw(...)
      mapView.StackedMaps.enable();
      mapView.StackedMaps.showOverview();
zoomInToMap: ((map, cameraTransform?) => Promise<void>)

Type declaration

    • (map, cameraTransform?): Promise<void>
    • Experimental

      Scroll and zoom into a specific map in OVERVIEW state. Stacked Maps state will become ZOOMED_IN.

      Parameters

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      // Zoom into a clicked map if Stacked Maps is in Overview state
      mapView.on(E_SDK_EVENT.CLICK, ({ maps }) => {
      if (maps.length <= 0) return;
      if (mapView.StackedMaps.state === STACKED_MAPS_STATE.OVERVIEW) {
      mapView.StackedMaps.zoomInToMap(maps[0]);
      }
      });

Accessors