Class DynamicFocusExperimental

API to dynamically set the map focus as you pan over map groups. Dynamic Focus can be enabled when initializing the MapView with base map set in TMapViewOptions

Example

const mapView = await showVenue(document.getElementById('mappedin-map'), venue, {
dynamicFocus: {
baseMap: venue.maps[0],
},
});

Hierarchy

  • DynamicFocus

Accessors

  • get setMapOnUserInteraction(): boolean
  • Experimental

    Returns the current boolean value whether the map should be set when the user pans over it.

    Returns boolean

    Example

    if(mapView.DynamicFocus && mapView.DynamicFocus.setMapOnUserInteraction) {
    mapView.DynamicFocus.setMapOnUserInteraction = false;
    }
  • set setMapOnUserInteraction(value): void
  • Experimental

    Controls whether the map should be set when the user pans over to it.

    Parameters

    • value: boolean

    Returns void

    Example

    if (mapView.DynamicFocus) {
    mapView.DynamicFocus.setMapOnUserInteraction = false;
    }

Methods

  • Reset the default map for a map group. This map will be set when the user pans over the map group.

    Parameters

    Returns void

  • Set the default map for a map group. This map will be set when the user pans over the map group.

    Parameters

    Returns void

  • Experimental

    Force Dynamic Focus to evaluate and set the current map based on camera position.

    Returns void

    Example

    // Animate the camera to focus on a building
    await mapView.Camera.focusOn({
    polygons: venue.locations.find(l => l.name === 'Building')?.polygons,
    });
    // Force Dynamic Focus update
    mapView.DynamicFocus?.update();