Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMapViewer

Describes the API for interacting with the map viewer

export
interface

IMapViewer

Hierarchy

  • IMapViewer

Index

Methods

addHandler

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

    memberof

    IMapViewer

    Parameters

    • eventName: string
    • handler: Function

    Returns void

addInteraction

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

    template

    T

    memberof

    IMapViewer

    Type parameters

    • T: olInteraction

    Parameters

    • interaction: T

    Returns T

addOverlay

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

    memberof

    IMapViewer

    Parameters

    • overlay: olOverlay

    Returns void

addSubscribers

  • 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

  • cancelDigitization(): void
  • Cancels active digitization

    memberof

    IMapViewer

    Returns void

clearSelection

  • clearSelection(): void
  • Clears the map selection

    memberof

    IMapViewer

    Returns void

digitizeCircle

  • digitizeCircle(handler: DigitizerCallback<olCircle>, prompt?: undefined | string): void
  • Starts the digitization process for a circle

    memberof

    IMapViewer

    Parameters

    Returns void

digitizeLine

  • digitizeLine(handler: DigitizerCallback<olLineString>, prompt?: undefined | string): void
  • Starts the digitization process for a line

    memberof

    IMapViewer

    Parameters

    Returns void

digitizeLineString

  • digitizeLineString(handler: DigitizerCallback<olLineString>, prompt?: undefined | string): void
  • Starts the digitization process for a line string

    memberof

    IMapViewer

    Parameters

    Returns void

digitizePoint

  • digitizePoint(handler: DigitizerCallback<olPoint>, prompt?: undefined | string): void
  • Starts the digitization process for a point

    memberof

    IMapViewer

    Parameters

    Returns void

digitizePolygon

  • digitizePolygon(handler: DigitizerCallback<olPolygon>, prompt?: undefined | string): void
  • Starts the digitization process for a polygon

    memberof

    IMapViewer

    Parameters

    Returns void

digitizeRectangle

  • digitizeRectangle(handler: DigitizerCallback<olPolygon>, prompt?: undefined | string): void
  • Starts the digitization process for a rectangle

    memberof

    IMapViewer

    Parameters

    Returns void

dismissToast

  • dismissToast(key: string): void
  • Parameters

    • key: string

    Returns void

dispatch

  • 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

getActiveTool

getCurrentExtent

  • Gets the current extent

    memberof

    IMapViewer

    Returns Bounds

getCurrentView

  • Gets the current map view

    memberof

    IMapViewer

    Returns IMapView

getDefaultLineStyle

getDefaultPointCircleStyle

getDefaultPointIconStyle

getDefaultPolygonStyle

getLayerManager

  • 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: undefined | string

    Returns ILayerManager

getMapName

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

    memberof

    IMapViewer

    Returns string

getMetersPerUnit

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

    memberof

    IMapViewer

    Returns number

getOLFactory

getProjection

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

    memberof

    IMapViewer

    Returns ProjectionLike

getResolution

  • getResolution(): number
  • Gets the view resolution

    memberof

    IMapViewer

    Returns number

getSelectedFeatures

  • getSelectedFeatures(): Collection<Feature>
  • 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

    Returns Collection<Feature>

getSelection

getSelectionXml

  • getSelectionXml(selection: FeatureSet, layerIds?: string[]): string
  • Gets the current selection model as a selection XML string

    memberof

    IMapViewer

    Parameters

    • selection: FeatureSet
    • Optional layerIds: string[]

    Returns string

getSessionId

  • getSessionId(): string
  • Gets the current session id

    memberof

    IMapViewer

    Returns string

getSize

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

    memberof

    IMapViewer

    Returns [number, number]

getSubscribers

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

    since

    0.13

    Returns string[]

getViewForExtent

  • Gets the view for the given extent

    memberof

    IMapViewer

    Parameters

    Returns IMapView

getViewRotation

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

    memberof

    IMapViewer

    Returns number

initialView

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

    memberof

    IMapViewer

    Returns void

isDigitizing

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

    memberof

    IMapViewer

    Returns boolean

isFeatureTooltipEnabled

  • isFeatureTooltipEnabled(): boolean
  • Gets whether feature tooltips are enabled

    memberof

    IMapViewer

    Returns boolean

isViewRotationEnabled

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

    memberof

    IMapViewer

    Returns boolean

queryMapFeatures

  • queryMapFeatures(options: IQueryMapFeaturesOptions, success?: undefined | function, failure?: undefined | function): void
  • Performs a map selection by the given query options

    memberof

    IMapViewer

    Parameters

    Returns void

refreshMap

  • Refreshes the map

    memberof

    IMapViewer

    Parameters

    Returns void

removeHandler

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

    memberof

    IMapViewer

    Parameters

    • eventName: string
    • handler: Function

    Returns void

removeInteraction

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

    template

    T

    memberof

    IMapViewer

    Type parameters

    • T: olInteraction

    Parameters

    • interaction: T

    Returns void

removeOverlay

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

    memberof

    IMapViewer

    Parameters

    • overlay: olOverlay

    Returns void

removeSubscribers

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

    since

    0.13

    Parameters

    • names: string[]

    Returns boolean

scaleToResolution

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

    memberof

    IMapViewer

    Parameters

    • scale: number

    Returns number

screenToMapUnits

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

    0.11

    memberof

    IMapViewer

    Parameters

    • x: number
    • y: number

    Returns [number, number]

selectByGeometry

  • Performs a map selection by the given geometry

    memberof

    IMapViewer

    Parameters

    • geom: olGeometry

      The geometry to select with

    • Optional selectionMethod: SelectionVariant

      The selection method

    Returns void

setActiveTool

  • Sets the active tool

    memberof

    IMapViewer

    Parameters

    Returns void

setFeatureTooltipEnabled

  • setFeatureTooltipEnabled(enabled: boolean): void
  • Enables/disables feature tooltips

    memberof

    IMapViewer

    Parameters

    • enabled: boolean

    Returns void

setSelectionXml

  • setSelectionXml(xml: string, queryOpts?: Partial<IQueryMapFeaturesOptions>, success?: undefined | function, failure?: undefined | function): void
  • Sets the selection XML

    memberof

    IMapViewer

    Parameters

    • xml: string
    • Optional queryOpts: Partial<IQueryMapFeaturesOptions>
    • Optional success: undefined | function
    • Optional failure: undefined | function

    Returns void

setViewRotation

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

    memberof

    IMapViewer

    Parameters

    • rotation: number

    Returns void

setViewRotationEnabled

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

    memberof

    IMapViewer

    Parameters

    • enabled: boolean

    Returns void

toastError

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

    • icon: string
    • message: string | Element

    Returns string | undefined

toastPrimary

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

    • icon: string
    • message: string | Element

    Returns string | undefined

toastSuccess

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

    • icon: string
    • message: string | Element

    Returns string | undefined

toastWarning

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

    • icon: string
    • message: string | Element

    Returns string | undefined

updateSize

  • updateSize(): void
  • Returns void

zoomDelta

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

    memberof

    IMapViewer

    Parameters

    • delta: number

    Returns void

zoomToExtent

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

    memberof

    IMapViewer

    Parameters

    Returns void

zoomToView

  • 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