Geoportal Resources Access API Reference

Namespace: GetConfigInterface

Gp.Services.GetConfigInterface

Response object for Gp.Services.getConfig () invocation when successful. Received as the argument of onSuccess callback function.

Properties:
Name Type Description
generalOptions Object

General properties for default map configuration resources.

Properties
Name Type Description
apiKeys Object

Object that associates apiKey (s) with an array of resources IDs availables with that key.

title String

Underlying web service Title.

defaultGMLGFIStyle String

XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.

theme String

default theme (FIXME : for what ?)

wgs84Resolutions Array.<Float>

geographical resolutions Array for each zoom level of the Geoportal platform from 0 to 21. Expressed in degrees/pixel.

layers Object

Associative array mapping resources availables IDs (keys) with their properties (values given as Gp.Services.Config.Layer).

tileMatrixSets Object

Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as Gp.Services.Config.TileMatrixSet).

Methods

getGlobalConstraints(layerId){Object}

Services/Config/ConfigInterface.js, line 302

Get global constraints for a given Layer : extent, minScale, maxScale, projection

Name Type Description
layerId String

Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS")

Returns:
Name Type Description
params Object - layer constraints
Name Type Description
projection String - default layer projection
minScale Number - layer min scale denominator
maxScale Number - layer max scale denominator
extent Gp.BBox - layer extent expressed in the layer projection

getLayerConf(layerId){Object}

Services/Config/ConfigInterface.js, line 143

Returns a geoportal layer configuration, given its identifier

Name Type Description
layerId String

Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS")

Returns:
- Layer configuration

getLayerId(layerName, service){String}

Services/Config/ConfigInterface.js, line 75

Returns the id of a Geoportal layer with its name and its service.

Name Type Description
layerName String

name of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS")

service String

name of the service (ex. "WMS" ou "WMTS")

Returns:
of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS")

getLayerKey(layerId){Array}

Services/Config/ConfigInterface.js, line 253

Get the contract key(s) associated to a given layer.

Name Type Description
layerId String

Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS")

Returns:
- array of key(s) associated to the given layer

getLayerParams(layerName, service, apiKey){Object}

Services/Config/ConfigInterface.js, line 173

Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key

Name Type Description
layerName String

name of the layer (ex. "ORTHOIMAGERY.ORTHOPHOTOS")

service String

name of the service (ex. "WMS" ou "WMTS")

apiKey String optional

Contract API key

Returns:
Name Type Description
params Object - params of the service (WMS or WMTS) for the given layer
Name Type Description
url String - Url of the service to reach to display the layer
version String - Version of the service
styles String - Default style of the layer
format String - Default format of the layer
projection String - Default projection of the layer
minScale Number - Min scale denominator of the layer
maxScale Number - Max scale denominator of the layer
extent Gp.BBox - Extent of the layer, in the projection of the layer
legends Array - Array of legends associated to the layer
title Array - Name of the layer, readable by a human
description Array - Description of the layer
[TMSLink] String - Id of the Tile Matrix Set (TMS), in the case of WMTS layer
[matrixOrigin] Gp.Point - Originof the tile matrix (top left corner), in the case of WMTS layer
[nativeResolutions] Array - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer
[matrixIds] Array - Array with the ID of each level of the tile matrix set, in the case of WMTS layer

getLayersConf(apiKey){Object}

Services/Config/ConfigInterface.js, line 125

Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.
If no key is specified, all layers from configuration are returned.

Name Type Description
apiKey String

Access key to Geoportal platform

Returns:
- Object which properties are layers identifiers.

getLayersId(apiKey){Array}

Services/Config/ConfigInterface.js, line 64

Returns an array of Geoportal layers identifiers, corresponding to an API contract key.

Name Type Description
apiKey String

Access key to Geoportal platform

Returns:
- Array of geoportal layers identifiers

getTileMatrixSets(){Object}

Services/Config/ConfigInterface.js, line 275

Returns an associative array of Tile Matrix Sets configurations.

Returns:
- Object which properties are TMS identifiers

getTMSConf(tmsID){Object}

Services/Config/ConfigInterface.js, line 285

Returns a Tile Matrix Sets configuration, given its identifier.

Name Type Description
tmsID String

Tile Matrix Set identifier (e.g. : "PM")

Returns:
- Tile Matrix Set configuration

isKeyConfLoaded(apiKey){Boolean}

Services/Config/ConfigInterface.js, line 48

Check if config is loaded for a given key

Name Type Description
apiKey String

Access key to Geoportal platform

Returns:
- true if config of the key is already loaded, false otherwise