Options
All
  • Public
  • Public/Protected
  • All
Menu

Describes the API for interacting with the map viewer

export
interface

IMapViewer

Hierarchy

Index

Methods

  • addHandler(eventName: string, handler: Function): void
  • Adds an event handler for the specified event

    memberof

    IMapViewer

    Parameters

    • eventName: string
    • handler: Function

    Returns void

  • addInteraction<T>(interaction: T): T
  • Adds an OpenLayers interaction

    memberof

    IMapViewer

    Type parameters

    • T: Interaction<T>

    Parameters

    • interaction: T

    Returns T

  • addOverlay(overlay: Overlay): void
  • Adds an OpenLayers overlay

    memberof

    IMapViewer

    Parameters

    • overlay: Overlay

    Returns void

  • EXPERIMENTAL: Adds the given application state subscribers

    NOTE: Calling this method will trigger a re-render of the component. Due to this quirk, calling this method again while a re-render is taking place may cause the subscriber to not actually be registered. Calling this method multiple times in succession is therefore not advised. If you need to add multiple subscribers, pass an array of the subscribers to register in a single method call.

    since

    0.13

    Parameters

    Returns string[]

  • cancelDigitization(): void
  • Cancels active digitization

    memberof

    IMapViewer

    Returns void

  • Starts the digitization process for a circle

    memberof

    IMapViewer

    Parameters

    Returns void

  • Starts the digitization process for a line

    memberof

    IMapViewer

    Parameters

    Returns void

  • Starts the digitization process for a line string

    memberof

    IMapViewer

    Parameters

    Returns void

  • Starts the digitization process for a point

    memberof

    IMapViewer

    Parameters

    Returns void

  • Starts the digitization process for a polygon

    memberof

    IMapViewer

    Parameters

    Returns void

  • Starts the digitization process for a rectangle

    memberof

    IMapViewer

    Parameters

    Returns void

  • dismissToast(key: string): void
  • Parameters

    • key: string

    Returns void

  • dispatch(action: any): void
  • Dispatches the given action

    remarks

    Usage outside of the react component context (eg. Plain HTML Task Pane content) should be used sparingly. In particular you should avoid trying to call this method multiple times in succession. You should call this method once in response to a DOM element event (eg. A button click)

    alpha
    since

    0.13

    Parameters

    • action: any

    Returns void

  • Exports an image of the current map view

    memberof

    IMapViewer

    since

    0.14

    Parameters

    Returns void

  • Gets the current extent

    memberof

    IMapViewer

    Returns Bounds

  • Gets the current map view

    memberof

    IMapViewer

    Returns IMapView

  • Gets the layer manager for the given map. If map name is not specifed it will get the layer manager for the currently active map.

    memberof

    IMapViewer

    since

    0.12

    Parameters

    • Optional mapName: string

    Returns ILayerManager

  • getMapName(): string
  • Gets the name of the current runtime map

    memberof

    IMapViewer

    Returns string

  • getMetersPerUnit(): number
  • Gets the meters per unit value

    memberof

    IMapViewer

    Returns number

  • getProjection(): ProjectionLike
  • Gets the projection of the map

    memberof

    IMapViewer

    Returns ProjectionLike

  • getResolution(): undefined | number
  • Gets the view resolution

    memberof

    IMapViewer

    Returns undefined | number

  • getSelectedFeatures(): undefined | Collection<Feature<Geometry>>
  • Returns the collection of selected client-side vector features. This collection is observable, so you may hold onto a reference to this collection and subscribe to events on this collection for when new features are added or removed from this collection

    memberof

    IMapViewer

    since

    0.13

    since

    0.14 - The return value may be undefined if called when the map viewer is detached/disposed/destroyed

    Returns undefined | Collection<Feature<Geometry>>

  • getSize(): [number, number]
  • Gets the current physical size of the map

    memberof

    IMapViewer

    Returns [number, number]

  • getSubscribers(): string[]
  • EXPERIMENTAL: Gets all application state subscriber names

    since

    0.13

    Returns string[]

  • Gets the view for the given extent

    memberof

    IMapViewer

    since

    0.14 If given an extent with zero-width or zero-height, the view will be computed off of an "inflated" version of this extent. If inflation is required, it will be inflated by 30 meters

    Parameters

    Returns IMapView

  • getViewRotation(): number
  • Gets the current view rotation

    memberof

    IMapViewer

    Returns number

  • initialView(): void
  • Sets the initial map view

    memberof

    IMapViewer

    Returns void

  • isDigitizing(): boolean
  • Gets whether the viewer is currently in the state of digitizing

    memberof

    IMapViewer

    Returns boolean

  • isViewRotationEnabled(): boolean
  • Gets whether view rotation is enabled

    memberof

    IMapViewer

    Returns boolean

  • Gets MapGuide-specific viewer functionality. If this viewer was not set up with MapGuide support, this is undefined

    memberof

    IMapViewer

    since

    0.14

    Returns undefined | IMapGuideViewerSupport

  • Refreshes the map

    memberof

    IMapViewer

    Parameters

    Returns void

  • removeHandler(eventName: string, handler: Function): void
  • Removes an event handler for the specified event

    memberof

    IMapViewer

    Parameters

    • eventName: string
    • handler: Function

    Returns void

  • removeInteraction<T>(interaction: T): void
  • Removes the given OpenLayers interaction

    memberof

    IMapViewer

    Type parameters

    • T: Interaction<T>

    Parameters

    • interaction: T

    Returns void

  • removeOverlay(overlay: Overlay): void
  • Removes the given OpenLayers overlay

    memberof

    IMapViewer

    Parameters

    • overlay: Overlay

    Returns void

  • removeSubscribers(names: string[]): boolean
  • EXPERIMENTAL: Removes application state subscribers of the given names

    since

    0.13

    Parameters

    • names: string[]

    Returns boolean

  • scaleToResolution(scale: number): number
  • Gets the resolution for the given scale

    memberof

    IMapViewer

    Parameters

    • scale: number

    Returns number

  • screenToMapUnits(x: number, y: number): [number, number]
  • since

    0.11

    memberof

    IMapViewer

    Parameters

    • x: number
    • y: number

    Returns [number, number]

  • Sets the active tool

    memberof

    IMapViewer

    Parameters

    Returns void

  • setViewRotation(rotation: number): void
  • Sets the current view rotation

    memberof

    IMapViewer

    Parameters

    • rotation: number

    Returns void

  • setViewRotationEnabled(enabled: boolean): void
  • Sets whether view rotation is enabled or not

    memberof

    IMapViewer

    Parameters

    • enabled: boolean

    Returns void

  • toastError(icon: string, message: string | Element): undefined | string
  • Parameters

    • icon: string
    • message: string | Element

    Returns undefined | string

  • toastPrimary(icon: string, message: string | Element): undefined | string
  • Parameters

    • icon: string
    • message: string | Element

    Returns undefined | string

  • toastSuccess(icon: string, message: string | Element): undefined | string
  • Parameters

    • icon: string
    • message: string | Element

    Returns undefined | string

  • toastWarning(icon: string, message: string | Element): undefined | string
  • Parameters

    • icon: string
    • message: string | Element

    Returns undefined | string

  • updateSize(): void
  • Returns void

  • zoomDelta(delta: number): void
  • Zooms in or out by the specified delta

    memberof

    IMapViewer

    Parameters

    • delta: number

    Returns void

  • zoomToExtent(extent: Bounds): void
  • Zooms to the specified extent

    memberof

    IMapViewer

    Parameters

    Returns void

  • zoomToView(x: number, y: number, scale: number): void
  • Zooms to the specified map view

    memberof

    IMapViewer

    Parameters

    • x: number
    • y: number
    • scale: number

    Returns void

Generated using TypeDoc