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. If a Journey is drawn beforehand the default behaviour is to only display the floors that are part of the journey. TStackedMapsOptions can be used to enabling display of all maps including those that are not part of the journey. Use showOverview to expand the maps vertically after enabling.

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

      Parameters

      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();
restack: ((options?) => Promise<void>)

Type declaration

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

      Used when in OVERVIEW state to replace the maps in the current stack after clearing or creating a Journey. Use this to hide maps that are not part of the journey or to display all maps in the MapGroup.

      Parameters

      • Optional options: TStackedMapsOptions

        Options to adjust the overview. Each option defaults to the setting passed in enable, unless provided.

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      mapView.Journey.draw(...);
      mapView.StackedMaps.enable();
      mapView.StackedMaps.showOverview();
      mapView.Journey.clear();
      mapView.StackedMaps.restack();
scrollToMap: ((map, duration?) => Promise<void>)

Type declaration

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

      Scroll the camera to a specific map in OVERVIEW state.

      Parameters

      Returns Promise<void>

      Promise when all animations are complete.

      Example

      // Scroll the camera to a specific 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: ((animationOptions?) => Promise<void>)

Type declaration

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

      Expand and display all maps in the current MapGroup. If a Journey has been drawn, vertical paths between connections are displayed. Stacked Maps must be enabled beforehand and state will become OVERVIEW.

      Parameters

      Returns Promise<void>

      Promise when all animations are complete.

      Example

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

Type declaration

    • (map, cameraOptions?): 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