Home Reference Source
import {G4UMap} from 'guide4you/src/G4UMap.js'
public class | source

G4UMap

Extends:

ol/Map~OlMap → G4UMap

Definition of the map-object Main task of the constructor is to load and read out the configuration. Uses the functions makeMapLayers, makeMapUI to create the map.

Custom properties accessible via method .get('propertyName')

Static Method Summary

Static Public Methods
public static

loadConfigFile(fileName: *): *

Constructor Summary

Public Constructor
public

constructor(target: HTMLElement | jQuery | string, configs: Configs, options: G4UMapOptions)

Member Summary

Public Members
public
public
public
public
Private Members
private

defaultInteractions_: Map<string, ol.interaction.Interaction[]>

private
private

supersedingInteractions_: Map<string, ol.interaction.Interaction[]>

Method Summary

Public Methods
public

Reactivates all default interactions which use a specified event type

public

addDefaultInteraction(eventTypes: string, interaction: ol.interaction.Interaction)

Add an interaction that should be active by default (i.e.

public

overwrite base method to notify developer about differing api

public

addModule(module: Module)

public

addModules(modules: Module[])

public

addSupersedingInteraction(eventTypes: string, interaction: ol.interaction.Interaction)

This adds an interaction to the map which prohibits other interactions which use the same eventtype to be active at the same time.

public

afterPostrender(listener: *)

The listener is called once immediately after the next postrender event

public

This deactivates all interactions which use a given event type

public

Searches all controls of the specified name

public

getControlsByType(type: *): *

public

getDefaultInteractions(eventType: string): ol.interaction.Interaction[]

Gets all interactions which use the specified event type

public
public

loadConfigs(configs: *): *

public

Remove all controls

public

removeInteraction(interaction: ol.interaction.Interaction)

public

Remove all interactions

public

setLayerGroup(groupLayer: GroupLayer, silent: boolean)

public

updateClientConfig(config: *): *

public

updateLayerConfig(config: *): *

Static Public Methods

public static loadConfigFile(fileName: *): * source

Params:

NameTypeAttributeDescription
fileName *

Return:

*

Public Constructors

public constructor(target: HTMLElement | jQuery | string, configs: Configs, options: G4UMapOptions) source

Params:

NameTypeAttributeDescription
target HTMLElement | jQuery | string

element or id of an element

configs Configs
options G4UMapOptions
  • optional
  • default: {}

Public Members

public activating_: boolean source

public interactionDecativationTimeout_: * source

public oldLayerConfigs_: * source

public oldMapConfigs_: * source

Private Members

private defaultInteractions_: Map<string, ol.interaction.Interaction[]> source

private modules_: Module[] source

private supersedingInteractions_: Map<string, ol.interaction.Interaction[]> source

Public Methods

public activateInteractions(eventType: string) source

Reactivates all default interactions which use a specified event type

Params:

NameTypeAttributeDescription
eventType string

public addDefaultInteraction(eventTypes: string, interaction: ol.interaction.Interaction) source

Add an interaction that should be active by default (i.e. in the normal state of the map)

Params:

NameTypeAttributeDescription
eventTypes string

a list of space separated eventtypes this interaction reacts on

interaction ol.interaction.Interaction

public addInteraction() source

overwrite base method to notify developer about differing api

public addModule(module: Module) source

Params:

NameTypeAttributeDescription
module Module

public addModules(modules: Module[]) source

Params:

NameTypeAttributeDescription
modules Module[]

public addSupersedingInteraction(eventTypes: string, interaction: ol.interaction.Interaction) source

This adds an interaction to the map which prohibits other interactions which use the same eventtype to be active at the same time. When the superseding interaction is activated all affected ones get deactivated and vice versa

Params:

NameTypeAttributeDescription
eventTypes string

a list of space separated eventtypes this interaction reacts on

interaction ol.interaction.Interaction

public afterPostrender(listener: *) source

The listener is called once immediately after the next postrender event

Params:

NameTypeAttributeDescription
listener *

public deactivateInteractions(eventType: string) source

This deactivates all interactions which use a given event type

Params:

NameTypeAttributeDescription
eventType string

public getControlsByName(name: string): Control[] source

Searches all controls of the specified name

Params:

NameTypeAttributeDescription
name string

Return:

Control[]

public getControlsByType(type: *): * source

Params:

NameTypeAttributeDescription
type *

Return:

*

public getDefaultInteractions(eventType: string): ol.interaction.Interaction[] source

Gets all interactions which use the specified event type

Params:

NameTypeAttributeDescription
eventType string

Return:

ol.interaction.Interaction[]

public getModules(): Module[] source

Return:

Module[]

public loadConfigs(configs: *): * source

Params:

NameTypeAttributeDescription
configs *

Return:

*

public removeControls() source

Remove all controls

public removeInteraction(interaction: ol.interaction.Interaction) source

Params:

NameTypeAttributeDescription
interaction ol.interaction.Interaction

public removeInteractions() source

Remove all interactions

public setLayerGroup(groupLayer: GroupLayer, silent: boolean) source

Params:

NameTypeAttributeDescription
groupLayer GroupLayer
silent boolean
  • optional
  • default: false

provide map to layers

public updateClientConfig(config: *): * source

Params:

NameTypeAttributeDescription
config *

Return:

*

public updateLayerConfig(config: *): * source

Params:

NameTypeAttributeDescription
config *

Return:

*