Class: GOLayer

GOLayer

GOLayer

new GOLayer(layerId, layerAlias, isBaseLayer, layerName, layerType, layerUrl, topicId)

Layers/GoLayer/index.ts, line 34

Constructs a GOLayer instance.

Name Type Description
layerId string

The layer id.

layerAlias string

The layer alias.

isBaseLayer string

The layer is base layer.

layerName string

The layer name.

layerType string

The layer type.

layerUrl string

The layer url.

topicId string

The topic id.

Methods

addInteractions(interactions){GoLayerInteractions}

Layers/GoLayer/index.ts, line 184

Adds interactions to the layer.

Name Type Description
interactions LayerInteractions

The interactions to be added to the layer.

Returns:
Type Description
GoLayerInteractions The interactions object associated with the layer.

changeLayerOpacity(opacity){void}

Layers/GoLayer/index.ts, line 167

Changes the opacity of the layer.

Name Type Description
opacity number

The new opacity value (0-100).

Returns:
Type Description
void

emit(eventName, args){void}

Layers/GoLayer/index.ts, line 227

Emits an event to all registered listeners for the specified event.

Name Type Description
eventName string

The name of the event to emit.

args Array.<any> repeatable

Additional arguments to pass to the event listeners.

Returns:
Type Description
void

getAlias(){string}

Layers/GoLayer/index.ts, line 416

Gets the alias of the layer.

Returns:
Type Description
string The alias of the layer.

getEventHandlers(eventName){Array.<function()>}

Layers/GoLayer/index.ts, line 246

Gets the event handlers for the specified event.

Name Type Description
eventName string

The name of the event to retrieve handlers for.

Returns:
Type Description
Array.<function()> An array of event handler functions.

getExtent(){Array.<number>|null}

Layers/GoLayer/index.ts, line 547

Gets the geographical extent of the layer.

Returns:
Type Description
Array.<number> | null The extent as an array of numbers or null if the extent is not defined.

getId(){string}

Layers/GoLayer/index.ts, line 424

Gets the unique identifier of the layer.

Returns:
Type Description
string The layer ID.

getLayerName(){string}

Layers/GoLayer/index.ts, line 432

Gets the name of the layer.

Returns:
Type Description
string The name of the layer.

getLayerOpts(){types.layerOptions}

Layers/GoLayer/index.ts, line 408

Gets the options used to configure the layer.

Returns:
Type Description
types.layerOptions The layer configuration options.

getLayerProjection(){string}

Layers/GoLayer/index.ts, line 584

Get the projection code of the layer.

Returns:
Type Description
string The projection code of the layer.

getLayerStyle(){GoStyle}

Layers/GoLayer/index.ts, line 575

Gets the style associated with the layer.

Returns:
Type Description
GoStyle The style of the layer.

getLayerType(){string}

Layers/GoLayer/index.ts, line 448

Gets the type of the layer.

Returns:
Type Description
string The layer type.

getLayerUrl()

Layers/GoLayer/index.ts, line 107

get layerUrl

getMaxResolution(){number}

Layers/GoLayer/index.ts, line 464

Gets the maximum resolution at which the layer is visible.

Returns:
Type Description
number The maximum resolution.

getMinResolution(){number}

Layers/GoLayer/index.ts, line 472

Gets the minimum resolution at which the layer is visible.

Returns:
Type Description
number The minimum resolution.

getOlMap(){OlMap}

Layers/GoLayer/index.ts, line 400

Gets the OpenLayers map instance associated with the layer.

Returns:
Type Description
OlMap The OpenLayers map instance.

getOptions(){layerOptions}

Layers/GoLayer/index.ts, line 567

Gets the options used to configure the layer.

Returns:
Type Description
layerOptions The layer configuration options.

getUrl(){string}

Layers/GoLayer/index.ts, line 440

Gets the URL associated with the layer.

Returns:
Type Description
string The URL of the layer.

getZIndex(){number}

Layers/GoLayer/index.ts, line 456

Gets the z-index of the layer.

Returns:
Type Description
number The z-index value.

goMap(){void}

Layers/GoLayer/index.ts, line 130

This function allow to get the map.

Returns:
Type Description
void Return GOStagingMap

hasEvent(eventName){boolean}

Layers/GoLayer/index.ts, line 237

Checks if there are listeners registered for the specified event.

Name Type Description
eventName string

The name of the event to check for listeners.

Returns:
Type Description
boolean True if there are listeners for the event, false otherwise.

hasFilter(){boolean}

Layers/GoLayer/index.ts, line 305

Checks if this layer currently has a filter applied.

Returns:
Type Description
boolean True if a filter is applied, false otherwise.

isBaseLayer(){boolean}

Layers/GoLayer/index.ts, line 158

Checks if the layer is a base layer.

Returns:
Type Description
boolean True if the layer is a base layer, false otherwise.

off(eventName, callback){void}

Layers/GoLayer/index.ts, line 217

Removes an event listener for the specified event.

Name Type Description
eventName string optional

The name of the event to remove the listener from.

callback function optional

The callback function to remove.

Returns:
Type Description
void

on(eventName, callback){void}

Layers/GoLayer/index.ts, line 197

Registers an event listener for the specified event.

Name Type Description
eventName string

The name of the event to listen for.

callback function

The callback function to invoke when the event is fired.

Returns:
Type Description
void

onLayerLoaded(){Promise.<unknown>}

Layers/GoLayer/index.ts, line 175

Returns a promise that resolves when the layer is fully loaded.

Returns:
Type Description
Promise.<unknown> A promise that resolves when the layer is loaded.

onPropChange(obj, prop, callback){void}

Layers/GoLayer/index.ts, line 258

Monitors changes to a specific property of an object and fires an event when the property changes.

Name Type Description
obj Object

The object containing the property to monitor.

prop string

The name of the property to monitor.

callback function

The callback function to invoke when the property changes.

Returns:
Type Description
void

once(eventName, callback){void}

Layers/GoLayer/index.ts, line 207

Registers a one-time event listener for the specified event.

Name Type Description
eventName string

The name of the event to listen for once.

callback function

The callback function to invoke when the event is fired.

Returns:
Type Description
void

removeFilter(){void}

Layers/GoLayer/index.ts, line 355

Removes the filter applied to the layer, resetting it to the default state. Forces the layer to refresh after removing the filter.

Returns:
Type Description
void

setLayerStyle(style){void|Promise}

Layers/GoLayer/index.ts, line 629

Sets the style of the layer and optionally adds annotations if applicable.

Name Type Description
style Array.<GoGlobalStyle> | GoGlobalStyle optional

The style or array of styles to apply.

Returns:
Type Description
void | Promise
  • Returns nothing or a promise depending on the type of style applied.

setMaxResolution(maxResolution){void}

Layers/GoLayer/index.ts, line 611

Sets the maximum resolution at which the layer is visible.

Name Type Description
maxResolution number

The maximum resolution value.

Returns:
Type Description
void

setMinResolution(minResolution){void}

Layers/GoLayer/index.ts, line 620

Sets the minimum resolution at which the layer is visible.

Name Type Description
minResolution number

The minimum resolution value.

Returns:
Type Description
void

setVisibility(visibility){void}

Layers/GoLayer/index.ts, line 593

Sets the visibility of the layer.

Name Type Description
visibility boolean

True to make the layer visible, false to hide it.

Returns:
Type Description
void

setZIndex(zIndex){void}

Layers/GoLayer/index.ts, line 602

Sets the z-index of the layer.

Name Type Description
zIndex number

The z-index value to set.

Returns:
Type Description
void

unmount(){void}

Layers/GoLayer/index.ts, line 88

Unmount function

Returns:
Type Description
void

validateLayerConfig(layerOpts){void}

Layers/GoLayer/index.ts, line 116

Validates the layer configuration and sets default values if necessary.

Name Type Description
layerOpts types.layerOptions

The layer options to validate.

Returns:
Type Description
void