new Resource(options)

Parameter

Name Type Optional Description

options

 

 

Options.

Properties

className  (undefined or String)

Classname.

imageSmoothingEnabled  (undefined or boolean)

imageSmoothingEnabled.

Methods

getDatetime() → (Date or undefined)

Returns the datetime of the resource.

Returns

(Date or undefined) Date.

getId() → mixed

Returns an ID for this resource. Should change, if content of resource changes.

Returns

mixed Id.

getLayerGroup() → (external:ol.layer.group, external:L.layerGroup, or undefined)

Returns the layer group of the resource layer.

Returns

(external:ol.layer.group, external:L.layerGroup, or undefined) Layer group.

getLLLayer() → external:L.layer

Returns layer for Leaflet of this resource.

Returns

external:L.layer Leaflet layer.

getMIMEType() → string

Returns MIME-Type of the resource.

Returns

string MIME-Type.

getOLLayer() → external:ol.layer.Layer

Returns layer for openlayers of this resource.

Returns

external:ol.layer.Layer openlayers layer.

getOpacity() → number

Returns opacity of the resource layer.

Returns

number Opacity.

getReloadTime() → (undefined or integer)

Returns the current reload time.

Returns

(undefined or integer) Reload time period.

getUrl() → (string or undefined)

Returns URL to the resource. Undefined if unknown.

Returns

(string or undefined) URL.

getVisible() → boolean

Returns the visibility of the resource layer.

Returns

boolean Visible.

getZIndex() → (number or undefined)

Returns the z-Index of the resource layer.

Returns

(number or undefined) z-Index.

protected

makeLLLayer() → external:L.Layer

Returns Leaflet layer of this resource. Must be overwritten by child classes.

Returns

external:L.Layer Leaflet layer.

protected

makeOLLayer() → external:ol.layer.Layer

Returns openlayers layer of this resource. Must be overwritten by child classes.

Returns

external:ol.layer.Layer openlayers layer.

preload()

Preload resource. By default, openlayers loads the resource as soon as the resource gets visible.

setLayerGroup(layerGroup) → module:meteoJS/synview/resource.Resource

Sets the layer group and adds the resource layer to this group. If undefined is passed, the resource layer will be deleted and removed for any layer group.

Parameter

Name Type Optional Description

layerGroup

(external:ol.layer.group, external:L.layerGroup, or undefined)

 

Layer group.

Returns

module:meteoJS/synview/resource.Resource This.

setOpacity(opacity) → module:meteoJS/synview/resource.Resource

Sets opacity of the resource layer.

Parameter

Name Type Optional Description

opacity

number

 

Opacity.

Returns

module:meteoJS/synview/resource.Resource This.

setReloadTime(reloadTime) → module:meteoJS/synview/resource.Resource

Sets the reload time.

Parameter

Name Type Optional Description

reloadTime

(undefined or integer)

 

Reload time period.

Returns

module:meteoJS/synview/resource.Resource This.

setVisible(visible) → module:meteoJS/synview/resource.Resource

Sets the visibility of the resource layer.

Parameter

Name Type Optional Description

visible

boolean

 

Visible.

Returns

module:meteoJS/synview/resource.Resource This.

setZIndex(zIndex) → module:meteoJS/synview/resource.Resource

Sets the z-Index of the resource layer.

Parameter

Name Type Optional Description

zIndex

(number or undefined)

 

z-Index.

Returns

module:meteoJS/synview/resource.Resource This.