Options
All
  • Public
  • Public/Protected
  • All
Menu

The base map viewer component

export
class

MapViewerBase

extends

{React.Component}

Hierarchy

Index

Constructors

constructor

Properties

context

context: any

props

props: Readonly<object> & Readonly<IMapViewerBaseProps>

refs

refs: object

Type declaration

  • [key: string]: ReactInstance

state

state: Readonly<Partial<IMapViewerBaseState>>

Methods

addHandler

  • addHandler(eventName: string, handler: Function): void
  • Parameters

    • eventName: string
    • handler: Function

    Returns void

addInteraction

  • addInteraction<T>(interaction: T): T
  • Type parameters

    • T: Interaction

    Parameters

    • interaction: T

    Returns T

addLayer

  • addLayer<T>(name: string, layer: T): T
  • Type parameters

    • T: LayerBase

    Parameters

    • name: string
    • layer: T

    Returns T

addOverlay

  • addOverlay(overlay: Overlay): void
  • Parameters

    • overlay: Overlay

    Returns void

cancelDigitization

  • cancelDigitization(): void
  • Returns void

clearSelection

  • clearSelection(): void
  • Returns void

componentDidMount

  • componentDidMount(): void
  • Returns void

componentWillReceiveProps

componentWillUnmount

  • componentWillUnmount(): void
  • Returns void

Protected createOLMap

  • createOLMap(options: MapOptions): any
  • Parameters

    • options: MapOptions

    Returns any

digitizeCircle

  • digitizeCircle(handler: DigitizerCallback<Circle>, prompt?: undefined | string): void
  • Parameters

    Returns void

digitizeLine

  • digitizeLine(handler: DigitizerCallback<LineString>, prompt?: undefined | string): void
  • Parameters

    Returns void

digitizeLineString

  • digitizeLineString(handler: DigitizerCallback<LineString>, prompt?: undefined | string): void
  • Parameters

    Returns void

digitizePoint

  • digitizePoint(handler: DigitizerCallback<Point>, prompt?: undefined | string): void
  • Parameters

    Returns void

digitizePolygon

  • digitizePolygon(handler: DigitizerCallback<Polygon>, prompt?: undefined | string): void
  • Parameters

    Returns void

digitizeRectangle

  • digitizeRectangle(handler: DigitizerCallback<Polygon>, prompt?: undefined | string): void
  • Parameters

    Returns void

forceUpdate

  • forceUpdate(callBack?: undefined | function): void
  • Parameters

    • Optional callBack: undefined | function

    Returns void

getCurrentExtent

getCurrentView

getLayer

  • getLayer<T>(name: string, factory: function): T
  • Type parameters

    • T: LayerBase

    Parameters

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

    Returns T

getMetersPerUnit

  • getMetersPerUnit(): number
  • Returns number

getOLView

  • getOLView(): View
  • Returns View

getPointSelectionBox

getProjection

  • getProjection(): ol.ProjectionLike
  • Returns ol.ProjectionLike

getResolution

  • getResolution(): number
  • Returns number

getSize

  • getSize(): [number, number]
  • Returns [number, number]

getViewForExtent

hasLayer

  • hasLayer(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

initialView

  • initialView(): void
  • Returns void

isDigitizing

  • isDigitizing(): boolean
  • Returns boolean

isFeatureTooltipEnabled

  • isFeatureTooltipEnabled(): boolean
  • Returns boolean

queryMapFeatures

  • queryMapFeatures(options: IQueryMapFeaturesOptions, success?: undefined | function, failure?: undefined | function): void
  • Parameters

    Returns void

refreshMap

  • refreshMap(mode?: RefreshMode.LayersOnly | RefreshMode.SelectionOnly): void
  • Parameters

    • Default value mode: RefreshMode.LayersOnly | RefreshMode.SelectionOnly = RefreshMode.LayersOnly | RefreshMode.SelectionOnly

    Returns void

removeHandler

  • removeHandler(eventName: string, handler: Function): void
  • Parameters

    • eventName: string
    • handler: Function

    Returns void

removeInteraction

  • removeInteraction<T>(interaction: T): void
  • Type parameters

    • T: Interaction

    Parameters

    • interaction: T

    Returns void

removeLayer

  • removeLayer(name: string): LayerBase | undefined
  • Parameters

    • name: string

    Returns LayerBase | undefined

removeOverlay

  • removeOverlay(overlay: Overlay): void
  • Parameters

    • overlay: Overlay

    Returns void

render

  • render(): Element
  • Returns Element

renderContextMenu

  • renderContextMenu(): Element
  • Returns Element

resolutionToScale

  • resolutionToScale(resolution: number): number
  • Parameters

    • resolution: number

    Returns number

scaleToResolution

  • scaleToResolution(scale: number): number
  • Parameters

    • scale: number

    Returns number

selectByGeometry

  • selectByGeometry(geom: Geometry): void
  • Parameters

    • geom: Geometry

    Returns void

setFeatureTooltipEnabled

  • setFeatureTooltipEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

setSelectionXml

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

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

    Returns void

setState

  • setState<K>(f: function, callback?: undefined | function): void
  • setState<K>(state: Pick<Partial<IMapViewerBaseState>, K>, callback?: undefined | function): void

zoomDelta

  • zoomDelta(delta: number): void
  • Parameters

    • delta: number

    Returns void

zoomToExtent

  • zoomToExtent(extent: Bounds): void
  • Parameters

    Returns void

zoomToView

  • zoomToView(x: number, y: number, scale: number): void
  • Parameters

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

    Returns void

Static Optional componentDidCatch

  • componentDidCatch(error: Error, errorInfo: ErrorInfo): void
  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

Static Optional componentDidMount

  • componentDidMount(): void
  • Called immediately after a compoment is mounted. Setting state here will trigger re-rendering.

    Returns void

Static Optional componentDidUpdate

  • Called immediately after updating occurs. Not called for the initial render.

    Parameters

    Returns void

Static Optional componentWillMount

  • componentWillMount(): void
  • Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

    Returns void

Static Optional componentWillReceiveProps

  • Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.

    Calling Component#setState generally does not trigger this method.

    Parameters

    Returns void

Static Optional componentWillUnmount

  • componentWillUnmount(): void
  • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

    Returns void

Static Optional componentWillUpdate

  • Called immediately before rendering when new props or state is received. Not called for the initial render.

    Note: You cannot call Component#setState here.

    Parameters

    Returns void

Static Optional shouldComponentUpdate

  • Called to determine whether the change in props and state should trigger a re-render.

    Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

    If false is returned, Component#render, componentWillUpdate and componentDidUpdate will not be called.

    Parameters

    Returns boolean

Generated using TypeDoc