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) => void);
    onFloorsUpdate?: ((floors) => void);
    onLoadingStateChange?: ((isLoading) => void);
    onMapClick?: (() => void);
    onPlacemarkClick?: ((placemark, event) => void);
    onPlacemarksUpdate?: ((placemarks) => void);
    onTagClick?: ((tag, event) => void);
    onTagsUpdate?: ((tags) => void);
    overlays?: CustomOverlay[];
    placemarks?: CreateMapPlacemarksOptions;
    shouldMapPanZoom?: ((event) => boolean);
    showFloorsControl?: boolean;
    showSearchControl?: boolean;
    tags?: CreateMapTagsOptions;
    width?: string;
}

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.

Type declaration

    • (): void
    • Returns void

onFloorChange?: ((floor) => void)

Called after the floor is changed.

Type declaration

    • (floor): void
    • Parameters

      Returns void

onFloorsUpdate?: ((floors) => void)

Called after the floors list is updated.

Type declaration

    • (floors): void
    • Parameters

      Returns void

onLoadingStateChange?: ((isLoading) => void)

Called when the loading state changes.

Type declaration

    • (isLoading): void
    • Parameters

      • isLoading: boolean

      Returns void

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.

Type declaration

    • (): void
    • Returns void

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

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

Type declaration

onPlacemarksUpdate?: ((placemarks) => 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).

Type declaration

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

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

Type declaration

onTagsUpdate?: ((tags) => 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).

Type declaration

    • (tags): void
    • Parameters

      Returns void

overlays?: CustomOverlay[]

An array of custom overlays to draw on the map.

Options related to placemarks.

shouldMapPanZoom?: ((event) => boolean)

Type declaration

    • (event): boolean
    • Parameters

      • event: any

      Returns 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").