Interface MeridianMap

Returned from createMap, this object allows you to manipulate a map that has already been created in the page.

interface MeridianMap {
    centerMap: (() => void);
    destroy: (() => void);
    isDestroyed: boolean;
    update: ((updatedOptions) => void);
    zoomToDefault: (() => void);
    zoomToPoint: ((options) => void);
}

Properties

centerMap: (() => void)

Center the map while retaining the current scale.

Type declaration

    • (): void
    • Center the map while retaining the current scale.

      Returns void

destroy: (() => void)

Remove the Meridian Map from the DOM and clean up all ongoing network connections.

If you are writing a single page app you MUST use this call before hiding the Meridian Map, or you will having network connections that keep going in the background.

Type declaration

    • (): void
    • Remove the Meridian Map from the DOM and clean up all ongoing network connections.

      If you are writing a single page app you MUST use this call before hiding the Meridian Map, or you will having network connections that keep going in the background.

      Returns void

isDestroyed: boolean

Has this map been destroyed

update: ((updatedOptions) => void)

Update the Meridian map to have new options.

Type declaration

    • (updatedOptions): void
    • Update the Meridian map to have new options.

      Parameters

      Returns void

zoomToDefault: (() => void)

Set zoom to the default level and pan to the default position.

Type declaration

    • (): void
    • Set zoom to the default level and pan to the default position.

      Returns void

zoomToPoint: ((options) => void)

Pan to x/y coordinate and scale to a given zoom factor.

Type declaration

    • (options): void
    • Pan to x/y coordinate and scale to a given zoom factor.

      Parameters

      • options: {
            scale: number;
            x: number;
            y: number;
        }
        • scale: number
        • x: number
        • y: number

      Returns void

Generated using TypeDoc