Class: Layer

mcutils.format.layer. Layer

Abstract base class; normally only used for creating subclasses and not instantiated in apps. Generic format for reading/writing layer.


new Layer()

Constructor

Source:
format/layer/Layer.js

Extends

Methods


read(options)

Abstract class for reading layer

Parameters:
Name Type Description
options Object

JSON object

Overrides:
Source:
format/layer/Layer.js
Returns:
Type
Layer | boolean

readOptions(layer, options)

Set the layers options (visibility, opacity, etc.)

Parameters:
Name Type Description
layer ol.layer

ol layer

options Object
Properties
Name Type Description
name String

name of the layer

title String

title of the layer

opacity bool

opacity of the layer, default 1

visibility bool

visibility of the layer

copyright String

layer copyright

description String

layer description

cluster boolean
maxZoomCluster number
popupHoverSelect vboolean
Source:
format/layer/Layer.js

write()

Abstract class for reading layer

Overrides:
Source:
format/layer/Layer.js
Returns:
Type
Layer | boolean

writeOptions(layer, options)

Get the layers options (visibility, opacity, etc.)

Parameters:
Name Type Description
layer ol.layer

ol layer

options Object

a list of options to extend. The list is extended in place.

Source:
format/layer/Layer.js
Returns:

the options

Type
Object