Class: LayerVectorRealEarth

LayerVectorRealEarth

Vector real earth vector

Constructor

new LayerVectorRealEarth(options)

Real Earth vector layer
Parameters:
Name Type Description
options object config
Properties
Name Type Attributes Default Description
id string <optional>
layer id
name string <optional>
Unnamed Layer layer name
opacity number <optional>
1 opacity
visible boolean <optional>
true default visible
minZoom number <optional>
min zoom level, 0 - 28
maxZoom number <optional>
max zoom level, 0 - 28
params object <optional>
{} the get parameters to include to retrieve the layer
zIndex number <optional>
0 the z index for the layer
loadCallback function <optional>
function to call on load, context this is the layer object
legendCollapse boolean <optional>
false if the legend item should be initially collapsed
legendCheckbox boolean <optional>
true if the legend item should have a checkbox for visibility
legendContent boolean <optional>
additional content to add to the legend
autoLoad boolean <optional>
false if the layer should auto load if not visible
style object <optional>
the layer style, use openlayers default style if not defined
onDemand boolean <optional>
false if the layer should be loaded by extent on map move
onDemandDelay number <optional>
300 delay before the map move callback should be called
mapMoveObj MapMoveCls <optional>
mapMove alternate map move object for use with multi map pages
transform object <optional>
{} SR transform, set as false for no transform
Properties
Name Type Default Description
dataProjection string EPSG:4326 the data CRS
featureProjection string EPSG:3857 the feature/map CRS
products string real earth products identifier
animate boolean <optional>
false if the layer should be animated
Source:

Extends

Members

autoLoad :boolean

get if the layer is autoloaded
Type:
  • boolean
Inherited From:
Source:

features :Array.<ol.Feature>

array of ol features
Type:
  • Array.<ol.Feature>
Inherited From:
Source:

legendContent :string

get the legend content
Type:
  • string
Inherited From:
Source:

loaded :boolean

Check if the layer is loaded
Type:
  • boolean
Inherited From:
Source:

mapCrs :string|*

get the map CRS if it is defined by the map move object
Type:
  • string | *
Inherited From:
Source:

mapMove :MapMove|*

get the map move object
Type:
  • MapMove | *
Inherited From:
Source:

mapMoveParams :object

map move params
Type:
  • object
Inherited From:
Source:

maxResolution :number|*

get the maximum resolution
Type:
  • number | *
Inherited From:
Source:

maxZoom :number|*

get max zoom
Type:
  • number | *
Inherited From:
Source:

minResolution :number|*

get the minimum resolution
Type:
  • number | *
Inherited From:
Source:

minZoom :number|*

get min zoom
Type:
  • number | *
Inherited From:
Source:

name :string

Get the layer name
Type:
  • string
Inherited From:
Source:

onDemandDelay :number|*

get on demand delay in miliseconds
Type:
  • number | *
Inherited From:
Source:

opacity :number

Get the layer opacity
Type:
  • number
Inherited From:
Source:

params :object

get the map get params
Type:
  • object
Inherited From:
Source:

source :*

get the layer source
Type:
  • *
Inherited From:
Source:

style :ol.Style|styleFunc

get the style definition
Type:
Inherited From:
Source:

url :string

get the url
Type:
  • string
Inherited From:
Source:

visible

Set the layer visibility
Inherited From:
Source:

zIndex :number

get the z index
Type:
  • number
Inherited From:
Source:

Methods

(protected) _load() → {boolean}

trigger load features
Inherited From:
Source:
Returns:
if already loaded
Type
boolean

addFeatures(featureCollection)

add feature collection
Parameters:
Name Type Description
featureCollection object as geojson object
Inherited From:
Source:

addLegendContent(additionalContent=opt)

add additional content to the legend
Parameters:
Name Type Attributes Description
additionalContent= string <optional>
additonal content to add
Inherited From:
Source:

clear()

clear features in the layer
Inherited From:
Source:

getLegendDiv() → {string}

Get the legend html, be sure to only add to the DOM once
Inherited From:
Source:
Returns:
html for layer wrapped in a div
Type
string

mapMoveBefore(zoom, evtTypeopt) → {boolean}

Before call to map move callback, can prevent call by returning false
Parameters:
Name Type Attributes Description
zoom number zoom level
evtType string <optional>
undefined for initial load, otherwise one of 'change:center', 'change:resolution'
Inherited From:
Source:
Returns:
if the call should proceed
Type
boolean

mapMoveCallback(d)

callback function on map move
Parameters:
Name Type Description
d object the json response
Inherited From:
Source:

mapMoveMakeGetParams(extent, zoomLevel)

callback to generate the parameters passed in the get request
Parameters:
Name Type Description
extent object extent object
Properties
Name Type Description
minX number minX
minY number minY
maxX number maxX
maxY number maxY
zoomLevel number zoom level
Inherited From:
Source:

refresh()

trick to refresh the layer
Inherited From:
Source: