diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index 148f147b..ba3c6ac2 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -1,26 +1,25 @@ -# Bibliothèque d'accès aux services Géoplateforme, version 3.4.2 +# Bibliothèque d'accès aux services Géoplateforme, version 3.4.x -**14/05/2024 : 3.4.2** +**21/08/2024 : 3.4.3** > release of geoportal access library ## Summary -Corrections sur le paramètrage du service d'isochrone et la normalisation des URL des services images +Mise à jour de la JSdoc sur le service de configuration ## Changelog * [Added] + * Ajout de la jsdoc sur le service de configuration + * [Changed] * [Removed] * [Fixed] - - Fix pour permettre des isodistances de plus de 50km (96ff3800e43e2b609208c8492cad2a8994997a6c) - - Fix pour correctement normaliser les URL ayant plusieurs point d'interrogation (#88) - * [Deprecated] * [Security] diff --git a/geoportal-access-lib-3.4.2.tgz b/geoportal-access-lib-3.4.2.tgz deleted file mode 100644 index a467f3c4..00000000 Binary files a/geoportal-access-lib-3.4.2.tgz and /dev/null differ diff --git a/geoportal-access-lib-3.4.3.tgz b/geoportal-access-lib-3.4.3.tgz new file mode 100644 index 00000000..7774d14f Binary files /dev/null and b/geoportal-access-lib-3.4.3.tgz differ diff --git a/package.json b/package.json index 5d2964d5..69707d66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "geoportal-access-lib", - "version": "3.4.2", - "date": "14/05/2024", + "version": "3.4.3", + "date": "21/08/2024", "description": "French Geoportal resources access library", "module": "src/Gp.js", "main": "dist/GpServices-src.js", @@ -26,6 +26,9 @@ "doc": "npm run doc:serve", "doc:serve": "webpack-dev-server --content-base jsdoc --port 9001 --open" }, + "engines": { + "node": "<=16" + }, "nyc": { "include": [ "src/**/*.js" diff --git a/src/Services/Config/Config.js b/src/Services/Config/Config.js index 9f58c29b..e5e5efc4 100644 --- a/src/Services/Config/Config.js +++ b/src/Services/Config/Config.js @@ -16,6 +16,7 @@ import ConfigInterface from "./ConfigInterface"; * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule * @param {Boolean} [options.sync=false] - force le mode synchrone * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey. + * @see Gp.Services.GetConfigInterface * * @example * var options = { diff --git a/src/Services/Config/ConfigInterface.js b/src/Services/Config/ConfigInterface.js index 0d245e64..da0b5dd7 100644 --- a/src/Services/Config/ConfigInterface.js +++ b/src/Services/Config/ConfigInterface.js @@ -139,6 +139,7 @@ ConfigInterface.prototype = { * * @param {String} layerId - Geoportal layer identifier (e.g. "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS") * @return {Object} layer - Layer configuration + * @see Gp.Services.Config.Layer */ getLayerConf : function (layerId) { if (!this.layers) { @@ -281,6 +282,7 @@ ConfigInterface.prototype = { * * @param {String} tmsID - Tile Matrix Set identifier (e.g. : "PM") * @return {Object} tileMatrixSet - Tile Matrix Set configuration + * @see Gp.Services.Config.TileMatrixSet */ getTMSConf : function (tmsID) { if (!this.tileMatrixSets) { diff --git a/src/Services/Config/model/Base.js b/src/Services/Config/model/Base.js new file mode 100644 index 00000000..7e7dcf5a --- /dev/null +++ b/src/Services/Config/model/Base.js @@ -0,0 +1,10 @@ + +/* eslint-disable no-unused-vars */ +/** + * A base layer + * + * type {Boolean} + * @namespace + * @alias Gp.Services.Config.Base + */ +var Base = ""; diff --git a/src/Services/Config/model/Constraint.js b/src/Services/Config/model/Constraint.js new file mode 100644 index 00000000..1a6bd914 --- /dev/null +++ b/src/Services/Config/model/Constraint.js @@ -0,0 +1,16 @@ + +/* eslint-disable no-unused-vars */ +/** + * + * Object used to express a geographical (BBOX, scale) and temporal constraint. + * + * @property {String} crs - Coordinates System ID used to express coordinates contraints. + * @property {Gp.BBox} bbox - Constraint Bounding Box. + * @property {Number} minScaleDenominator - Minimum scale denominator where constraint applies. + * @property {Number} maxScaleDenominator - Maximum scale denominator where constraint applies. + * @property {Array.} temporalExtent - Array expressing the time interval of the constraint [minT, maxT]. Dates are expressed in the [ISO-8601]{@link https://en.wikipedia.org/wiki/ISO_8601} way. + * + * @namespace + * @alias Gp.Services.Config.Constraint + */ +var Constraint = {}; diff --git a/src/Services/Config/model/Format.js b/src/Services/Config/model/Format.js new file mode 100644 index 00000000..ad6cf8d4 --- /dev/null +++ b/src/Services/Config/model/Format.js @@ -0,0 +1,12 @@ + +/* eslint-disable no-unused-vars */ +/** + * Object used to describe a format to use with Geoportal resources. + * + * @property {Boolean} current - If true, then this format is used by default. + * @property {String} name - Format mime-type. + * + * @namespace + * @alias Gp.Services.Config.Format + */ +var Format = {}; diff --git a/src/Services/Config/model/Layer.js b/src/Services/Config/model/Layer.js new file mode 100644 index 00000000..dc45100f --- /dev/null +++ b/src/Services/Config/model/Layer.js @@ -0,0 +1,42 @@ +/* eslint-disable no-unused-vars */ +/** + * Object used to describe geoportal resource (WMTS, WMS, WFS layers, geocoding resources or elevation service) parameters. Properties may be used or not depending on the resource type. + * + * @property {String} name - name of the resource to use with the webservice that serves it (eg : "GEOGRAPHICALGRIDSYSTEMS.MAPS"). + * @property {String} title - Human readable name for the resource. + * @property {String} description - Resource description. + * @property {String} layerId - Unique resource Identifier (eg : "GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS") + * @property {String} quicklookUrl - Image URL for the resource. + * @property {Object} serviceParams - Informations about the webservice that serves the resource (OpenLS, WFS, WMTS) + * @property {String} serviceParams.id - Web Service identifier ("OGC:WMTS", "OGC:OPENLS;ReverseGeocode", etc...) + * @property {Object} serviceParams.serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key). + * @property {String} serviceParams.version - webservice version. + * @property {String} defaultProjection - coordinates system ID used by default for the resource (WMS or WFS layer) or of the TileMatrixSet used by the WMTS layer. + * @property {Array.} additionalProjections - additional coordinates systems IDs availables for the resource, others than the default one (see defaultProjection) (WMS and WFS layers only). + * @property {Array.} formats - Formats availables for the resource. + * @property {Array.} legends - Informations about legends associated to the resource. + * @property {Array.} metadata - Informations about metadata associated to the resource. + * @property {Array.} styles - Informations about styles availables for the resources (WMS, WFS and WMTS only). + * @property {Array.} thematics - Informations about thematics associated to the resource. + * @property {Gp.Services.Config.Constraint} globalConstraint - geographical constraint for the resource. + * @property {Array.} constraints - additionnal geographical constraints for the resource. + * @property {Array.} originators - Informations about originator of the resource. + * @property {Object} wmtsOptions - Informations associated to WMTS resources. + * @property {String} wmtsOptions.tileMatrixSetLink - TileMatrixSet identifier used by the resource (see {@link Gp.Services.Config.TileMatrixSet}) + * @property {Gp.Services.Config.TileMatrixLimit} wmtsOptions.tileMatrixSetLimits - limits of the resource for that TileMAtrixSet. + * @property {Boolean} queryable - true if a getFeatureInfo request may be done for the resource (WMS or WMTS only). + * @property {Boolean} hidden - true if the resource is not visible. + * @property {Boolean} isAggregate - true if the resource is an aggregate of other resources (@see aggregatedLayers). + * @property {Array.} aggregatedLayers - Layers IDs composing the being described aggregated layer. + * @property {Array.} apiKeys - Array of access keys that grant access to that resource. + * @property {Object} dimensions - Dimensions informations associated with the resource. + * @property {String} dimensions.type + * @property {String} dimensions.visibilityRange + * @property {String} dimensions.visibilityMode + * @property {String} dimensions.noDataValue + * @property {String} dimensions.geometricType + * + * @namespace + * @alias Gp.Services.Config.Layer + */ +var Layer = {}; diff --git a/src/Services/Config/model/Legend.js b/src/Services/Config/model/Legend.js new file mode 100644 index 00000000..172697ca --- /dev/null +++ b/src/Services/Config/model/Legend.js @@ -0,0 +1,13 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a legend file associated with a geoportal resource (WMTS, WMS, WFS layers). + * + * @property {String} format - mime-type of the legend file. + * @property {String} url - legend file URL + * @property {Number} minScaleDenominator - minimum scale denominator where this legend applies. + * + * @namespace + * @alias Gp.Services.Config.Legend + */ +var Legend = {}; diff --git a/src/Services/Config/model/Metadata.js b/src/Services/Config/model/Metadata.js new file mode 100644 index 00000000..bf149e95 --- /dev/null +++ b/src/Services/Config/model/Metadata.js @@ -0,0 +1,12 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a metadata file associated with a geoportal resource. + * + * @property {String} format - mime-type of the metadata file. + * @property {String} url - metadata file URL + * + * @namespace + * @alias Gp.Services.Config.Metadata + */ +var Metadata = {}; diff --git a/src/Services/Config/model/Originator.js b/src/Services/Config/model/Originator.js new file mode 100644 index 00000000..b38d9151 --- /dev/null +++ b/src/Services/Config/model/Originator.js @@ -0,0 +1,15 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe an Originator of geoportal resource. + * + * @property {String} name - originator name + * @property {String} attribution - originator full name + * @property {String} logo - originator logo file URL + * @property {String} url - originator web site URL + * @property {Array.} constraints - where and when the originator applies for the ressource. + * + * @namespace + * @alias Gp.Services.Config.Originator + */ +var Originator = {}; diff --git a/src/Services/Config/model/Service.js b/src/Services/Config/model/Service.js new file mode 100644 index 00000000..23881523 --- /dev/null +++ b/src/Services/Config/model/Service.js @@ -0,0 +1,13 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a web service of the geoportal platform. + * + * @property {String} title - Web service name + * @property {Object} serverUrl - Associative array mapping geoportal access key (keys) with their properties (URLs of the web service, with the geoportal access key). + * @property {String} version - web service version. + * + * @namespace + * @alias Gp.Services.Config.Service + */ +var Service = {}; diff --git a/src/Services/Config/model/Style.js b/src/Services/Config/model/Style.js new file mode 100644 index 00000000..b0120a04 --- /dev/null +++ b/src/Services/Config/model/Style.js @@ -0,0 +1,14 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a style that may be used for a geoportal resource. + * + * @property {String} name - Style identifier (eg : "normal", "bdparcellaire", ...) + * @property {String} title - human readable name of the style. + * @property {Boolean} current - true if this is the default style. + * @property {String} url - Url Style (eg: vectortile). + * + * @namespace + * @alias Gp.Services.Config.Style + */ +var Style = {}; diff --git a/src/Services/Config/model/Territory.js b/src/Services/Config/model/Territory.js new file mode 100644 index 00000000..04c4d99f --- /dev/null +++ b/src/Services/Config/model/Territory.js @@ -0,0 +1,22 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe properties of a french territory covered by geoportal resources. + * + * @property {Boolean} isDefault - if this territory is to use by default. + * @property {String} defaultCRS - Identifier of the coordinates system to use by default for that territory. + * @property {Array.} additionalCRS - Identifiers of additional coordinates systems availables for that territory. + * @property {Array.} defaultLayers - Identifiers of layers to load by default for that territory. + * @property {Object} defaultOptions - options to use by default for that territory. + * @property {Number} defaultOptions.resolution - resolution to use by default for that territory (in meter per pixel). + * @property {Number} defaultOptions.minScaleDenominator - minimum scaleDenominator accessible for that territory. + * @property {Number} defaultOptions.maxScaleDenominator - maximum scaleDenominator accessible for that territory. + * @property {Gp.BBox} geoBBox - Bounding Box of the territory (expressed in geographical coordinates) + * @property {Object} geoCenter - center of the territory (expressed in geographical coordinates) + * @property {Float} geoCenter.lon - center longitude + * @property {Float} geoCenter.lat - center latitude + * + * @namespace + * @alias Gp.Services.Config.Territory + */ +var Territory = {}; diff --git a/src/Services/Config/model/Thematic.js b/src/Services/Config/model/Thematic.js new file mode 100644 index 00000000..fc11496a --- /dev/null +++ b/src/Services/Config/model/Thematic.js @@ -0,0 +1,10 @@ +/* eslint-disable no-unused-vars */ + +/** + * A thematic name + * + * type {String} + * @namespace + * @alias Gp.Services.Config.Thematic + */ +var Thematic = ""; diff --git a/src/Services/Config/model/TileMatrix.js b/src/Services/Config/model/TileMatrix.js new file mode 100644 index 00000000..3caa8962 --- /dev/null +++ b/src/Services/Config/model/TileMatrix.js @@ -0,0 +1,17 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a TileMatrix. + * + * @property {String} matrixId - matrix Identifier + * @property {Number} matrixHeight - Number of tiles from the top to the bottom of the matrix. + * @property {Number} matrixWidth - Number of tiles from the left to the right of the matrix. + * @property {Number} scaleDenominator - Scale denominator associated to that matrix. + * @property {Number} tileHeight - tile height in number of pixels + * @property {Number} tileWidth - tile width in number of pixels + * @property {Gp.Point} topLeftCorner - Top Left Corner Point of the matrix expressed in the tileMatrixSet coordinates system. + * + * @namespace + * @alias Gp.Services.Config.TileMatrix + */ +var TileMatrix = {}; diff --git a/src/Services/Config/model/TileMatrixLimit.js b/src/Services/Config/model/TileMatrixLimit.js new file mode 100644 index 00000000..720afe78 --- /dev/null +++ b/src/Services/Config/model/TileMatrixLimit.js @@ -0,0 +1,14 @@ +/* eslint-disable no-unused-vars */ + +/** + * Object used to describe a layer extent on a Tile Matrix. + * + * @property {Number} minTileCol - minimum column index where tile can be found on the Tile matrix. + * @property {Number} maxTileCol - maximum column index where tile can be found on the Tile matrix. + * @property {Number} minTileRow - minimum row index where tile can be found on the Tile matrix. + * @property {Number} maxTileCol - maximum row index where tile can be found on the Tile matrix. + * + * @namespace + * @alias Gp.Services.Config.TileMatrixLimit + */ +var TileMatrixLimit = {}; diff --git a/src/Services/Config/model/TileMatrixSet.js b/src/Services/Config/model/TileMatrixSet.js new file mode 100644 index 00000000..d18e627a --- /dev/null +++ b/src/Services/Config/model/TileMatrixSet.js @@ -0,0 +1,15 @@ +/* eslint-disable no-unused-vars */ + +/** + * + * Object used to describe a TileMatrix set (for WMTS use). + * + * @property {Array.} matrixIds - Array of IDs for each TileMatrix of the set. + * @property {Array.} tileMatrices - Array of TileMatrix descriptions. + * @property {Array.} nativeResolutions - Array of resolutions (in meter per pixel) applying for each TileMatrix of the set. + * @property {String} projection - Identifier of the Cordinates System used for the tileMatrixSet. + * + * @namespace + * @alias Gp.Services.Config.TileMatrixSet +*/ +var TileMatrixSet = {};