Function restrictedPanZoom

  • This function can be used to restrict pan/zoom events unless the user is holding down a modifier key (Control, Alt, Command, Shift) on their keyboard. This prevents accidental map interactions in pages with lots of scrolling content.

    Pass this to shouldMapPanZoom in createMap if you would like the user to use two fingers or hold down a modifier key in order to zoom the map.

    const api = new MeridianSDK.API({ token: "<TOKEN>" });

    const map = MeridianSDK.createMap(
    document.querySelector("#map-container"),
    {
    api,
    locationID: "<location ID>",
    floorID: "<floor ID>",
    height: "500px",
    shouldMapPanZoom: MeridianSDK.restrictedPanZoom,
    }
    )

    Parameters

    • event: any

    Returns boolean

Generated using TypeDoc