Property

new Type(options)

Parameter

Name Type Optional Description

options

 

 

Options.

Fires
module:meteoJS/synview/type#change:visible

Property

className  (undefined or String)

Classname.

Methods

appendResource(resource) → module:meteoJS/synview/type.Type

Append a resource to the collection. If type is visible, this might also change the resources on the map.

Parameter

Name Type Optional Description

resource

module:meteoJS/synview/resource.Resource

 

Resource object.

Fires
module:meteoJS/synview/type#change:resources
Returns

module:meteoJS/synview/type.Type This.

getDisplayedResource() → module:meteoJS/synview/resource.Resource

Returns resource of the displayed resource. If type contains resources with timestamps as well as a static resource, only a resource with timestamp will be returned. If type is invisible or no layer group is set, no resource is display, therefore an empty resource will be returned.

Returns

module:meteoJS/synview/resource.Resource Resource.

getId() → (string or undefined)

Returns ID of type.

Returns

(string or undefined) 

getLayerGroup()

Returns layer-group of this type on the map.

return {external:ol/layer/Group~LayerGroup} Layer-group.

getResourceCollection() → module:meteoJS/synview/resourceCollection.ResourceCollection

Returns collection of the resources. Note: If you directly append resources to the collection, no module:meteoJS/synview/type#change:resources event will be fired.

Returns

module:meteoJS/synview/resourceCollection.ResourceCollection resourceCollection.

getTooltip() → (module:meteoJS/synview/tooltip~contentFunction or undefined)

Returns the current tooltip function, undefined for no tooltip.

Returns

(module:meteoJS/synview/tooltip~contentFunction or undefined) Tooltip function.

getVisible() → boolean

Returns visibility.

Returns

boolean Visibility.

getZIndex() → (undefined or number)

Returns the z Index.

Returns

(undefined or number) 

removeResource(resource) → module:meteoJS/synview/type.Type

Removes a resource from the collection. If type is visible, this might also change the resources on the map.

Parameter

Name Type Optional Description

resource

module:meteoJS/synview/resource.Resource

 

Resource object.

Fires
module:meteoJS/synview/type#change:resources
Returns

module:meteoJS/synview/type.Type This.

setDisplayTime(time) → module:meteoJS/synview/type.Type

Sets time to display. Corresponding to the options an adequate resource will be searched and displayed. (accessible via getDisplayedResource())

Parameter

Name Type Optional Description

time

Date

 

Display time.

Returns

module:meteoJS/synview/type.Type This.

setId(id) → module:meteoJS/synview/type.Type

Sets ID of type.

Parameter

Name Type Optional Description

id

(string or undefined)

 

ID.

Returns

module:meteoJS/synview/type.Type This.

setLayerGroup(group) → module:meteoJS/synview/type.Type

Sets map layer-group for this type.

Parameter

Name Type Optional Description

group

external:ol/layer/Group~LayerGroup

 

layer-group.

Returns

module:meteoJS/synview/type.Type This.

setResources(resources) → module:meteoJS/synview/type.Type

Sets resources in the collection (and replaces previous ones). If type is visible, this might also change the resources on the map.

Parameter

Name Type Optional Description

resources

Array of module:meteoJS/synview/resource.Resource

 

List of resource objects.

Fires
module:meteoJS/synview/type#change:resources
Returns

module:meteoJS/synview/type.Type This.

setResourcesOLStyle([style]) → module:meteoJS/synview/type.Type

Sets style of all resources (if resource has 'setOLStyle' method). If argument 'style' isn't declared, the style will be updated. Convenience method, you could also loop over all resources.

Parameter

Name Type Optional Description

style

externalol/style/Style~Style

Yes

OpenLayers style.

Returns

module:meteoJS/synview/type.Type This.

setTooltip(tooltip) → module:meteoJS/synview/type.Type

Sets the tooltip function. Undefined for no tooltip.

Parameter

Name Type Optional Description

tooltip

(module:meteoJS/synview/tooltip~contentFunction or undefined)

 

Tooltip function.

Returns

module:meteoJS/synview/type.Type This.

setVisible(visible) → module:meteoJS/synview/type.Type

Sets visibility.

Parameter

Name Type Optional Description

visible

boolean

 

Visibility.

Fires
module:meteoJS/synview/type#change:visible
Returns

module:meteoJS/synview/type.Type This.

setZIndex(zIndex) → module:meteoJS/synview/type.Type

Sets the z Index.

Parameter

Name Type Optional Description

zIndex

(undefined or number)

 

z-Index.

Returns

module:meteoJS/synview/type.Type This.