Class: ServerLayer

ServerLayer

A server rendered image layer that displays images retrieved from the server. Respective server side rendering parameters may be modified using the interface of the object.

new ServerLayer(spec)

Instantiate a ServerLayer object.
Name Type Description
spec Object The Specification object.
{
    opacity {float}   - The opacity of the layer. Default = 1.0.
    enabled {boolean} - Whether the layer is visible or not. Default = true.
    zIndex  {integer} - The z index of the layer. Default = 1.
    renderer: {
        coarseness {integer} - The pixel by pixel coarseness. Default based on server configuration.
        ramp       {String}  - The color ramp type. Default based on server configuration.
        rangeMin   {integer} - The minimum percentage to clamp the low end of the color ramp. Default based on server configuration.
        rangeMax   {integer} - The maximum percentage to clamp the high end of the color ramp. Default based on server configuration.
    },
    valueTransform: {
        type {String} - Value transformer type. Default based on server configuration.
    },
    tileTransform: {
        type {String} - Tile transformer type. Default based on server configuration.
        data {Object} - The tile transformer data initialization object. Default based on server configuration.
    }
}

Methods

staticServerLayer.AnnotationLayer#redraw()

Redraws the entire layer.

getCoarseness(){integer}

Get the layers pixel coarseness.
Returns:
layers coarseness in N by N pixels.

getLevelMinMax(The)

Get the current minimum and maximum values for the current zoom level.
Name Type Description
The Object min and max of the level.

getQueryParamString(){String}

Generate query parameters based on state of layer
Returns:
query parameter string based on the attributes of this layer.

getRampImageUrl(){String}

Get the current ramp image URL string.
Returns:
encoded ramp image url.

getRampType(){String}

Get ramp type for layer.
Returns:
ramp identification string.

getRangeMaxPercentage(){number}

Get the current value by which the maximum color ramp is clamped to by percentage in the range [0-1].
Returns:
range min in percentage.

getRangeMaxValue(){number}

Get the current value by which the maximum color ramp is clamped to.
Returns:
range max by value.

getRangeMinPercentage(){number}

Get the current value by which the minimum color ramp is clamped to by percentage in the range [0-1].
Returns:
range max in percentage.

getRangeMinValue(){number}

Get the current value by which the minimum color ramp is clamped to.
Returns:
range min by value.

getTheme(){String}

Get the current theme for the layer.
Returns:
theme identifier string.

getTileTransformData(){Object}

Get the transformer data attribute.
Returns:
tile transform data attribute.

getTileTransformType(){String}

Get the layers transformer type.
Returns:
tile transform type.

getValueTransformType(){String}

Get the current value transform function type.
Returns:
value transform type.

getZIndex(){integer}

Get the layers zIndex.
Returns:
zIndex for the layer.
Redraws the entire layer.

setCoarseness(coarseness)

Set the layers pixel coarseness.
Name Type Description
coarseness integer The pixel by pixel coarseness of the layer

setRampType(rampType, callback)

Set the ramp type associated with the layer.
Name Type Description
rampType String The ramp type used to render the images.
callback function Optional callback function.

setRangeMaxPercentage(max)

Set the current value by which the maximum color ramp is clamped to by percentage in the range [0-1].
Name Type Description
max number The range max in percentage.

setRangeMaxValue(max)

Set the current value by which the maximum color ramp is clamped to.
Name Type Description
max number The range max by value.

setRangeMinPercentage(min)

Set the current value by which the minimum color ramp is clamped to by percentage in the range [0-1].
Name Type Description
min number The range min in percentage.

setRangeMinValue(min)

Set the current value by which the minimum color ramp is clamped to.
Name Type Description
min number The range min by value.

setTheme(theme)

Updates the theme associated with the layer.
Name Type Description
theme String The theme identifier string.

setTileTransformData(transformData)

Set the tile transform data attribute
Name Type Description
transformData Object The tile transform data attribute.

setTileTransformType(transformType)

Set the layers tile transform function type.
Name Type Description
transformType String The tile transformer type.

setValueTransformType(transformType)

Updates the value transform function associated with the layer. Results in a POST request to the server.
Name Type Description
transformType String The new new ramp function.

setZIndex(zIndex)

Set the z index of the layer.
Name Type Description
zIndex integer The new z-order value of the layer, where 0 is front.