@meridian/web-sdk
    Preparing search index...

    Interface CreateMapOptions

    Options passed to createMap.

    interface CreateMapOptions {
        annotations?: CustomAnnotationPoint[];
        api?: API;
        floorID: string;
        floorsControlSortDescending?: boolean;
        height?: string;
        loadPlacemarks?: boolean;
        loadTags?: boolean;
        locationID: string;
        maxZoomLevel?: number;
        minZoomLevel?: number;
        onDestroy?: () => void;
        onFloorChange?: (floor: FloorData) => void;
        onFloorsUpdate?: (floors: FloorData[]) => void;
        onLoadingStateChange?: (isLoading: boolean) => void;
        onMapClick?: () => void;
        onPlacemarkClick?: (placemark: PlacemarkData, event: MeridianEvent) => void;
        onPlacemarksUpdate?: (
            placemarks: {
                allPlacemarks: PlacemarkData[];
                filteredPlacemarks: PlacemarkData[];
            },
        ) => void;
        onTagClick?: (tag: TagData, event: MeridianEvent) => void;
        onTagsUpdate?: (
            tags: { allTags: TagData[]; filteredTags: TagData[] },
        ) => void;
        overlays?: CustomOverlay[];
        placemarks?: CreateMapPlacemarksOptions;
        shouldMapPanZoom?: (event: any) => boolean;
        showFloorsControl?: boolean;
        showSearchControl?: boolean;
        tags?: CreateMapTagsOptions;
        width?: string;
    }
    Index

    Properties

    annotations?: CustomAnnotationPoint[]

    An array of custom annotations to draw on the map.

    api?: API

    An API instance. Defaults to the one passed to init.

    floorID: string

    Meridian floor ID.

    floorsControlSortDescending?: boolean

    Sort the floors in the Floor Switcher UI descending in order. Defaults to false (ascending in order).

    height?: string

    Height of the map (e.g. "100%" or "200px")

    loadPlacemarks?: boolean

    Set to false to disable loading placemarks. Defaults to true.

    loadTags?: boolean

    Set to false to disable loading tags. Defaults to true. This is required for locations without a TAGS SKU license

    locationID: string

    Meridian location ID.

    maxZoomLevel?: number

    Maximum zoom level. Default value is 8 which equals eight times the actual scale of the map.

    minZoomLevel?: number

    Minimum zoom level. Default value is dynamically calculated and matches the initial map scale (further zooming out is not allowed

    onDestroy?: () => void

    Called when the map has been destroyed, either by manually calling map.destroy() or by being automatically destroyed when its DOM is tampered with.

    onFloorChange?: (floor: FloorData) => void

    Called after the floor is changed.

    onFloorsUpdate?: (floors: FloorData[]) => void

    Called after the floors list is updated.

    onLoadingStateChange?: (isLoading: boolean) => void

    Called when the loading state changes.

    onMapClick?: () => void

    Called when the user clicks on the map. This is mostly useful as a way of knowing that the user has potentially unfocused a tag or placemark. This is NOT called when the user pans or zooms the map.

    onPlacemarkClick?: (placemark: PlacemarkData, event: MeridianEvent) => void

    Called when a placemark is clicked. Use event.preventDefault() to prevent the default dialog from appearing.

    onPlacemarksUpdate?: (
        placemarks: {
            allPlacemarks: PlacemarkData[];
            filteredPlacemarks: PlacemarkData[];
        },
    ) => void

    Called when tags on the current floor are updated. allPlacemarks is every placemark on the current floor, even ones not shown on the map. filteredPlacemarks is only the tags shown on the map (i.e. it respects showHiddenPlacemarks and filter).

    onTagClick?: (tag: TagData, event: MeridianEvent) => void

    Called when a tag is clicked. Use event.preventDefault() to prevent the default dialog from appearing.

    onTagsUpdate?: (tags: { allTags: TagData[]; filteredTags: TagData[] }) => void

    Called when tags on the current floor are updated. allTags is every tag on the current floor, even ones not shown on the map. filteredTags is only the tags shown on the map (i.e. it respects showControlTags and filter).

    overlays?: CustomOverlay[]

    An array of custom overlays to draw on the map.

    Options related to placemarks.

    shouldMapPanZoom?: (event: any) => boolean
    showFloorsControl?: boolean

    Should we show the floor switcher UI control? Defaults to true.

    showSearchControl?: boolean

    Should we show the Search UI control? Defaults to true.

    Options related to tags.

    width?: string

    Width of the map (e.g. "100%" or "300px").