Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapViewerContainer<SS>

Type parameters

  • SS

Hierarchy

Implements

Index

Constructors

constructor

Properties

context

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType.

static contextType = MyContext
context!: React.ContextType<typeof MyContext>
deprecated

if used without a type annotation, or without static contextType

see

https://reactjs.org/docs/legacy-context.html

props

props: Readonly<MapViewerContainerProps> & Readonly<object>

refs

refs: object

Type declaration

  • [key: string]: ReactInstance

state

state: Readonly<any>

Static Optional contextType

contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
  static contextType = Ctx
  context!: React.ContextType<typeof Ctx>
  render () {
    return <>My context's value: {this.context}</>;
  }
}
see

https://reactjs.org/docs/context.html#classcontexttype

Methods

Optional UNSAFE_componentWillMount

  • UNSAFE_componentWillMount(): void

Optional UNSAFE_componentWillReceiveProps

Optional UNSAFE_componentWillUpdate

  • UNSAFE_componentWillUpdate(nextProps: Readonly<MapViewerContainerProps>, nextState: Readonly<any>, nextContext: any): void

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

addOverlay

  • addOverlay(overlay: Overlay): void
  • Parameters

    • overlay: Overlay

    Returns void

cancelDigitization

  • cancelDigitization(): void
  • Returns void

clearSelection

  • clearSelection(): void
  • Returns void

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

componentDidMount

  • componentDidMount(): void
  • Returns void

componentDidUpdate

Optional componentWillMount

  • componentWillMount(): void

Optional componentWillReceiveProps

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

Optional componentWillUpdate

  • componentWillUpdate(nextProps: Readonly<MapViewerContainerProps>, nextState: Readonly<any>, nextContext: any): void

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

dismissToast

  • dismissToast(key: string): void
  • Parameters

    • key: string

    Returns void

forceUpdate

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

    • Optional callback: undefined | function

    Returns void

getActiveTool

getCurrentExtent

getCurrentView

getLayerManager

getMapName

  • getMapName(): string
  • Returns string

getMetersPerUnit

  • getMetersPerUnit(): number
  • Returns number

getOLFactory

getProjection

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

getResolution

  • getResolution(): number
  • Returns number

getSelection

getSelectionXml

  • getSelectionXml(selection: FeatureSet, layerIds?: string[]): string
  • Parameters

    • selection: FeatureSet
    • Optional layerIds: string[]

    Returns string

getSessionId

  • getSessionId(): string
  • Returns string

getSize

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

Optional getSnapshotBeforeUpdate

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns SS | null

getViewForExtent

getViewRotation

  • getViewRotation(): number
  • Returns number

initialView

  • initialView(): void
  • Returns void

isDigitizing

  • isDigitizing(): boolean
  • Returns boolean

isFeatureTooltipEnabled

  • isFeatureTooltipEnabled(): boolean
  • Returns boolean

isViewRotationEnabled

  • isViewRotationEnabled(): boolean
  • Returns boolean

queryMapFeatures

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

    Returns void

refreshMap

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

removeOverlay

  • removeOverlay(overlay: Overlay): void
  • Parameters

    • overlay: Overlay

    Returns void

render

  • render(): Element | Element[] | string | number | null | false
  • Returns Element | Element[] | string | number | null | false

scaleToResolution

  • scaleToResolution(scale: number): number
  • Parameters

    • scale: number

    Returns number

screenToMapUnits

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

    • x: number
    • y: number

    Returns [number, number]

selectByGeometry

  • selectByGeometry(geom: Geometry): void
  • Parameters

    • geom: Geometry

    Returns void

setActiveTool

setFeatureTooltipEnabled

  • setFeatureTooltipEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

setSelectionXml

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

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

    Returns void

setState

  • setState<K>(state: function | null | S | object, callback?: undefined | function): void
  • Type parameters

    • K: keyof any

    Parameters

    • state: function | null | S | object
    • Optional callback: undefined | function

    Returns void

setViewRotation

  • setViewRotation(rotation: number): void
  • Parameters

    • rotation: number

    Returns void

setViewRotationEnabled

  • setViewRotationEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

Optional shouldComponentUpdate

  • shouldComponentUpdate(nextProps: Readonly<MapViewerContainerProps>, nextState: Readonly<any>, nextContext: any): boolean
  • 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

toastError

  • toastError(iconName: string, message: string): string | undefined
  • Parameters

    • iconName: string
    • message: string

    Returns string | undefined

toastPrimary

  • toastPrimary(iconName: string, message: string): string | undefined
  • Parameters

    • iconName: string
    • message: string

    Returns string | undefined

toastSuccess

  • toastSuccess(iconName: string, message: string): string | undefined
  • Parameters

    • iconName: string
    • message: string

    Returns string | undefined

toastWarning

  • toastWarning(iconName: string, message: string): string | undefined
  • Parameters

    • iconName: string
    • message: string

    Returns string | undefined

updateSize

  • updateSize(): void
  • Returns 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

Object literals

Static contextTypes

contextTypes: object

store

store: Requireable<object> = PropTypes.object

Generated using TypeDoc