LayerBase
Direct Subclass:
Indirect Subclass:
The base layer class
Constructor Summary
Public Constructor | ||
public |
constructor(url: string, options: object) The base layer for all others |
Member Summary
Public Members | ||
public |
|
|
public |
id: * |
|
public get |
get the legend content |
|
public |
loadCallback: * |
|
public get |
Check if the layer is loaded |
|
public get |
maxResolution: number | * get the maximum resolution |
|
public get |
get max zoom |
|
public get |
minResolution: number | * get the minimum resolution |
|
public get |
get min zoom |
|
public set |
set the layer name |
|
public get |
Get the layer name |
|
public get |
|
|
public get |
Get the layer opacity |
|
public set |
Set the layer opacity |
|
public get |
get the map get params |
|
public get |
source: * get the layer source |
|
public get |
get the url |
|
public set |
Set the layer visibility |
|
public get |
Get the layer visibility |
|
public get |
get the z index |
|
public set |
set the z index |
Protected Members | ||
protected |
_olLayer: * |
|
protected set |
legendContent(newVal: string): * set the legend content directly |
|
protected set |
set the map get params |
Method Summary
Public Methods | ||
public |
addLegendContent(additionalContent: string) add additional content to the legend |
|
public |
applyCollapse(): * |
|
public |
Get the legend html, be sure to only add to the DOM once |
|
public |
refresh() trick to refresh the layer |
Protected Methods | ||
protected |
base load function, sets _loaded = true if it is not already |
Public Constructors
public constructor(url: string, options: object) source
The base layer for all others
Params:
Name | Type | Attribute | Description |
url | string | url for source |
|
options | object | config |
|
options.id | string |
|
layer id |
options.name | string |
|
Layer] - layer name |
options.opacity | number |
|
opacity |
options.visible | boolean |
|
default visible |
options.minZoom | number |
|
min zoom level, 0 - 28 |
options.maxZoom | number |
|
max zoom level, 0 - 28 |
options.params | object |
|
the get parameters to include to retrieve the layer |
options.zIndex | number |
|
the z index for the layer |
options.loadCallback | function |
|
function to call on load, context this is the layer object |
options.legendCollapse | boolean |
|
if the legend item should be initially collapsed |
options.legendCheckbox | boolean |
|
if the legend item should have a checkbox for visibility |
options.legendContent | boolean |
|
additional content to add to the legend |
Public Members
public id: * source
public loadCallback: * source
Protected Members
protected _olLayer: * source
Public Methods
public addLegendContent(additionalContent: string) source
add additional content to the legend
Params:
Name | Type | Attribute | Description |
additionalContent | string |
|
additonal content to add |