Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OpenLayersMapStrategy

A map strategy for working with the third-party OpenLayers mapping library.

export
implements

{MapStrategy}

Hierarchy

Index

Constructors

constructor

  • new OpenLayersMapStrategy(target: HTMLElement | HTMLElement[] | string | Map, opts?: any): OpenLayersMapStrategy

Properties

dataSource

Accessors

$el

  • get $el(): any
  • Returns any

factory

  • A factory provider that is responsible for generating the necessary map content as required by the mapping strategy.

    Returns OpenLayersOverlayFactory

map

  • get map(): Map
  • The third-party map view instance associated with the mapping strategy.

    Returns Map

opts

  • get opts(): {}
  • Returns {}

    • [key: string]: any

sources

  • get sources(): any[]
  • Returns any[]

strategy

  • get strategy(): string
  • Returns string

Methods

addMarker

  • addMarker(marker: any, data?: any): void
  • Markers

    Parameters

    • marker: any
    • Optional data: any

    Returns void

addMarkers

  • addMarkers(markers: any[]): void
  • Adds an array of markers to the map view. The provided markers must be an instance type required by the current mapping strategy.

    Parameters

    • markers: any[]

    Returns void

addOverlay

  • addOverlay(overlay: any, index?: number): void
  • Overlays

    Parameters

    • overlay: any
    • Optional index: number

    Returns void

addOverlays

  • addOverlays(overlays: any[]): void
  • Adds a series of overlay layers to the map. The overlays must be an instance of the type required by the configured map strategy and underlying third-party mapping library.

    memberof

    MapStrategy

    Parameters

    • overlays: any[]

    Returns void

addShape

  • addShape(shape: any, data?: any): void
  • Polygons & Polylines

    Parameters

    • shape: any
    • Optional data: any

    Returns void

addShapes

  • addShapes(shapes: any[], data?: any): void
  • Adds an array of polylines and/or polygons to the map view. The provided shapes must be an instance type required by the current mapping strategy.

    memberof

    MapStrategy

    Parameters

    • shapes: any[]
    • Optional data: any

    Returns void

addSource

  • addSource(source: any): void
  • Adds the specified map content source to the map.

    memberof

    MapStrategy

    Parameters

    • source: any

    Returns void

bindCalloutToMarker

  • bindCalloutToMarker(marker: any, content: string): void
  • Parameters

    • marker: any
    • content: string

    Returns void

clear

  • clear(): void
  • Returns void

containsLayer

  • containsLayer(layer: Layer): boolean
  • Parameters

    • layer: Layer

    Returns boolean

coordToPoint

fitBounds

  • fitBounds(bounds: GeoBounds, padding?: number[]): void
  • Parameters

    • bounds: GeoBounds
    • Default value padding: number[] = [10, 10]

    Returns void

getBounds

getCenter

getIndexBoundForGeom

  • getIndexBoundForGeom(type: string, min?: boolean): number
  • Parameters

    • type: string
    • Default value min: boolean = false

    Returns number

getInsertIndex

  • getInsertIndex(layer: Layer, positionOffset: number): number
  • Parameters

    • layer: Layer
    • positionOffset: number

    Returns number

getZoom

  • getZoom(): number
  • Returns number

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

hideShape

  • hideShape(shape: any): void
  • Parameters

    • shape: any

    Returns void

hideShapes

  • hideShapes(shapes: any[]): void
  • Parameters

    • shapes: any[]

    Returns void

isMarker

  • isMarker(el: any): boolean
  • Parameters

    • el: any

    Returns boolean

isPolygon

  • isPolygon(el: any): boolean
  • Parameters

    • el: any

    Returns boolean

isPolyline

  • isPolyline(el: any): boolean
  • Parameters

    • el: any

    Returns boolean

isReady

  • isReady(): boolean
  • Returns whether the map and underlying map strategy have been fully setup and initialized.

    memberof

    MapStrategy

    Returns boolean

isText

  • isText(source: any): boolean
  • Parameters

    • source: any

    Returns boolean

isTile

  • isTile(source: any): boolean
  • Sources

    Parameters

    • source: any

    Returns boolean

isVector

  • isVector(source: any): boolean
  • Returns whether the element is a vector source object.

    memberof

    MapStrategy

    Parameters

    • source: any

    Returns boolean

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

pointToCoord

removeMarker

  • removeMarker(marker: any): void
  • Parameters

    • marker: any

    Returns void

removeMarkers

  • removeMarkers(markers: any[]): void
  • Adds an array of markers from the map view. The provided markers must be an instance type required by the current mapping strategy.

    Parameters

    • markers: any[]

    Returns void

removeOverlay

  • removeOverlay(overlay: any): void
  • Parameters

    • overlay: any

    Returns void

removeOverlays

  • removeOverlays(overlays: any[]): void
  • Removes a series of overlay layers from the map. The overlay must be an instance of the type required by the configured map strategy and underlying third-party mapping library.

    memberof

    MapStrategy

    Parameters

    • overlays: any[]

    Returns void

removeShape

  • removeShape(shape: any): void
  • Parameters

    • shape: any

    Returns void

removeShapes

  • removeShapes(shapes: any[]): void
  • Removes an array of polylines and/or polygons from the map view. The provided shape must be an instance type required by the current mapping strategy.

    memberof

    MapStrategy

    Parameters

    • shapes: any[]

    Returns void

removeSource

  • removeSource(source: any): void
  • Removes the specified map content source from the map.

    memberof

    MapStrategy

    Parameters

    • source: any

    Returns void

setBaseStyle

  • setBaseStyle(url: string): void
  • Updates the base layer using tiles from the provided URL.

    memberof

    OpenLayersMapStrategy

    Parameters

    • url: string

    Returns void

setBaseUrl

  • setBaseUrl(url: string): void
  • Parameters

    • url: string

    Returns void

setBounds

  • Parameters

    Returns void

setCenter

  • Parameters

    Returns void

setView

  • Parameters

    Returns void

setZoom

  • setZoom(zoom: number): void
  • Parameters

    • zoom: number

    Returns void

showCallout

  • showCallout(target: any, content: any, opts?: any): void
  • Callout

    Parameters

    • target: any
    • content: any
    • Optional opts: any

    Returns void

showMarkers

  • showMarkers(markers: any[], show: boolean): void
  • Parameters

    • markers: any[]
    • show: boolean

    Returns void

showShape

  • showShape(shape: any): void
  • Parameters

    • shape: any

    Returns void

showShapes

  • showShapes(shapes: any[]): void
  • Parameters

    • shapes: any[]

    Returns void

tileLayer

  • tileLayer(layer: string, date: Date, opts?: any): TileSource
  • Parameters

    • layer: string
    • date: Date
    • Optional opts: any

    Returns TileSource

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

updateMarker

  • updateMarker(marker: any, options: MarkerOptions, layer?: string): void
  • Parameters

    • marker: any
    • options: MarkerOptions
    • Default value layer: string = null

    Returns void

Generated using TypeDoc