Constructor
(abstract) new LayerBase(url, options)
The base layer for all others
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | url for source | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
object | config
Properties
|
- Source:
Members
legendContent :string
get the legend content
Type:
- string
- Source:
(protected) legendContent
set the legend content directly
- Source:
loaded :boolean
Check if the layer is loaded
Type:
- boolean
- Source:
maxResolution :number|*
get the maximum resolution
Type:
- number | *
- Source:
maxZoom :number|*
get max zoom
Type:
- number | *
- Source:
minResolution :number|*
get the minimum resolution
Type:
- number | *
- Source:
minZoom :number|*
get min zoom
Type:
- number | *
- Source:
name :string
Get the layer name
Type:
- string
- Source:
name
set the layer name
- Source:
opacity :number
Get the layer opacity
Type:
- number
- Source:
opacity
Set the layer opacity
- Source:
params :object
get the map get params
Type:
- object
- Source:
(protected) params
set the map get params
- Source:
source :*
get the layer source
Type:
- *
- Source:
url :string
get the url
Type:
- string
- Source:
visible
Set the layer visibility
- Source:
visible :boolean
Get the layer visibility
Type:
- boolean
- Source:
zIndex :number
get the z index
Type:
- number
- Source:
zIndex
set the z index
- Source:
Methods
(protected) _load() → {boolean}
base load function, sets _loaded = true if it is not already
- Source:
Returns:
if already loaded
- Type
- boolean
addLegendContent(additionalContent=opt)
add additional content to the legend
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
additionalContent= |
string |
<optional> |
additonal content to add |
- Source:
getLegendDiv() → {string}
Get the legend html, be sure to only add to the DOM once
- Source:
Returns:
html for layer wrapped in a div
- Type
- string
refresh()
trick to refresh the layer
- Source: