Geoportal Extension for OpenLayers API Reference

Module: LayerUtils

Gp.LayerUtils

...

Example

getZoomLevelFromScaleDenominator();
getAttributions();
intersects();

Methods

innergetAttributions(params){Object}

Common/Utils/LayerUtils.js, line 184

Get attributions list for a layer, based on current zoom and extent

Name Type Description
params Object

function params

Name Type Description
extent Array.<Float>

map current geographical extent (EPSG:4326) : [top, left, bottom, right] = [maxy, minx, miny, maxx]

zoom Number

map current zoom

crs String

map current projection code (ex "EPSG:2154")

visibility Boolean

layer visibility

originators Gp.Services.Config.Originator

resource originators (from Gp.Config.layers[].originators)

Returns:
- associative array, mapping originators url (keys) with their properties : html attributions elements

innergetZoomLevelFromScaleDenominator(scaleDenominator, crs){Integer}

Common/Utils/LayerUtils.js, line 14

Obtenir le ZoomLevel à partir du ScaleDenominator

Name Type Description
scaleDenominator Number

the scale denominator

crs String

the crs

Returns:
level

innerintersects(extent1, extent2){Boolean}

Common/Utils/LayerUtils.js, line 300

Determines if one extent (extent1) intersects another (extent2)

Name Type Description
extent1 Array.<Float>

First extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]

extent2 Array.<Float>

Second extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]

Returns:
- True if the two extents intersect, false otherwise.