diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index c3d414d9..a65cdb3c 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -1,6 +1,6 @@ -# Bibliothèque d'accès aux services Géoportail, version 3.0.1 +# Bibliothèque d'accès aux services Géoportail, version 3.0.2 -**02/11/2021 : 3.0.1** +**10/11/2021 : 3.0.2** > release of geoportal access library @@ -12,12 +12,12 @@ * [Changed] - - [BREAKING CHANGE] utilisation du service itinéraire v2, adaptation de l'interface (#68) - * [Removed] * [Fixed] + - seule la geometrie complete est renvoyée par le service si la geometrie par portion n'est pas demandée (49c0059be9e0a2aa3f5e41af9ebfdb28152a7452) + * [Deprecated] * [Security] diff --git a/geoportal-access-lib-3.0.0.tgz b/geoportal-access-lib-3.0.0.tgz deleted file mode 100644 index 0e3d6401..00000000 Binary files a/geoportal-access-lib-3.0.0.tgz and /dev/null differ diff --git a/geoportal-access-lib-3.0.1.tgz b/geoportal-access-lib-3.0.2.tgz similarity index 83% rename from geoportal-access-lib-3.0.1.tgz rename to geoportal-access-lib-3.0.2.tgz index 952a30ae..e5dafcec 100644 Binary files a/geoportal-access-lib-3.0.1.tgz and b/geoportal-access-lib-3.0.2.tgz differ diff --git a/package.json b/package.json index 81ab46ed..581bab5a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "geoportal-access-lib", - "version": "3.0.1", - "date": "02/11/2021", + "version": "3.0.2", + "date": "10/11/2021", "description": "French Geoportal resources access library", "module": "src/Gp.js", "main": "dist/GpServices-src.js", diff --git a/src/Services/Route/Response/RouteResponseFactory.js b/src/Services/Route/Response/RouteResponseFactory.js index 0743da03..e8aee3d0 100644 --- a/src/Services/Route/Response/RouteResponseFactory.js +++ b/src/Services/Route/Response/RouteResponseFactory.js @@ -81,11 +81,11 @@ var RouteResponseFactory = { data.bbox.top = parseFloat(JSONResponse.bbox[3]); } - if (data.hasOwnProperty("routeGeometry")) { + if (data.hasOwnProperty("routeGeometry") && !options.geometryInInstructions) { data.routeGeometry = JSONResponse.geometry; } - if (data.hasOwnProperty("routeInstructions")) { + if (data.hasOwnProperty("routeInstructions") && options.geometryInInstructions) { var legList = JSONResponse.portions; var i; if (Array.isArray(legList) && legList.length) { diff --git a/src/Services/Route/Route.js b/src/Services/Route/Route.js index c8edfbbc..9b02eb00 100644 --- a/src/Services/Route/Route.js +++ b/src/Services/Route/Route.js @@ -309,7 +309,8 @@ Route.prototype.analyzeResponse = function (error, success) { rawResponse : this.options.rawResponse, onError : error, onSuccess : success, - scope : this + scope : this, + geometryInInstructions : this.options.geometryInInstructions }; RouteResponseFactory.build(options);