Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMapViewer

Describes the API for interacting with the map viewer

export
interface

IMapViewer

Hierarchy

  • IMapViewer

Implemented by

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

addLayer

  • addLayer<T>(name: string, layer: T): T
  • Adds a layer to the map

    template

    T

    memberof

    IMapViewer

    Type parameters

    • T: olLayerBase

    Parameters

    • name: string
    • layer: T

    Returns T

addOverlay

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

    memberof

    IMapViewer

    Parameters

    • overlay: olOverlay

    Returns void

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

getActiveTool

  • getActiveTool(): ActiveMapTool.Zoom | ActiveMapTool.Select | ActiveMapTool.Pan | ActiveMapTool.None
  • Gets the active tool

    memberof

    IMapViewer

    Returns ActiveMapTool.Zoom | ActiveMapTool.Select | ActiveMapTool.Pan | ActiveMapTool.None

getCurrentExtent

  • Gets the current extent

    memberof

    IMapViewer

    Returns Bounds

getCurrentView

  • Gets the current map view

    memberof

    IMapViewer

    Returns IMapView

getLayer

  • getLayer<T>(name: string, factory: function): T
  • Gets a layer by the given name

    template

    T

    memberof

    IMapViewer

    Type parameters

    • T: olLayerBase

    Parameters

    • name: string
    • factory: function
        • (): T
        • Returns T

    Returns T

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(): ol.ProjectionLike
  • Gets the projection of the map

    memberof

    IMapViewer

    Returns ol.ProjectionLike

getResolution

  • getResolution(): number
  • Gets the view resolution

    memberof

    IMapViewer

    Returns number

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 size of the map

    memberof

    IMapViewer

    Returns [number, number]

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

hasLayer

  • hasLayer(name: string): boolean
  • Gets whether the specified custom layer exists on the map

    Parameters

    • name: string

    Returns boolean

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

removeLayer

  • removeLayer(name: string): olLayerBase | undefined
  • Removes a layer by the given name

    memberof

    IMapViewer

    Parameters

    • name: string

    Returns olLayerBase | undefined

removeOverlay

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

    memberof

    IMapViewer

    Parameters

    • overlay: olOverlay

    Returns void

scaleToResolution

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

    memberof

    IMapViewer

    Parameters

    • scale: number

    Returns number

selectByGeometry

  • selectByGeometry(geom: olGeometry): void
  • Performs a map selection by the given geometry

    memberof

    IMapViewer

    Parameters

    • geom: olGeometry

    Returns void

setActiveTool

  • setActiveTool(tool: ActiveMapTool.Zoom | ActiveMapTool.Select | ActiveMapTool.Pan | ActiveMapTool.None): void
  • Sets the active tool

    memberof

    IMapViewer

    Parameters

    • tool: ActiveMapTool.Zoom | ActiveMapTool.Select | ActiveMapTool.Pan | ActiveMapTool.None

    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

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