LayerRecord

LayerRecord

new LayerRecord(layerClass, apiRef, config, esriLayer, epsgLookup)

Source:

Create a layer record with the appropriate geoApi layer type. Layer config should be fully merged with all layer options defined (i.e. this constructor will not apply any defaults).

Parameters:
Name Type Description
layerClass Object

the ESRI api object for the layer

apiRef Object

object pointing to the geoApi. allows us to call other geoApi functions.

config Object

layer config values

esriLayer Object

an optional pre-constructed layer

epsgLookup function

an optional lookup function for EPSG codes (see geoService for signature)

Methods

onMouseOut()

Source:

Handles when the mouse leaves a layer

onMouseOver()

Source:

Handles when the mouse enters a layer

validateProjection(spatialReference) → {Boolean}

Source:

Determines if layer's spatial ref matches the given spatial ref. Mainly used to determine if a tile wont display on a map. Highly recommend only calling this after a layer's load event has happened.

Parameters:
Name Type Description
spatialReference Object

spatial reference to compare against.

Returns:

true if layer has same sr as input. false otherwise.

Type
Boolean

LayerRecord

new LayerRecord()

Source:

Methods

onMouseOut()

Source:

Handles when the mouse leaves a layer

onMouseOver()

Source:

Handles when the mouse enters a layer

validateProjection(spatialReference) → {Boolean}

Source:

Determines if layer's spatial ref matches the given spatial ref. Mainly used to determine if a tile wont display on a map. Highly recommend only calling this after a layer's load event has happened.

Parameters:
Name Type Description
spatialReference Object

spatial reference to compare against.

Returns:

true if layer has same sr as input. false otherwise.

Type
Boolean