Skip to content

Commit

Permalink
release 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
elias75015 committed May 14, 2024
2 parents df2d563 + 20c77f2 commit bb40bf3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
10 changes: 5 additions & 5 deletions DRAFT_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Bibliothèque d'accès aux services Géoplateforme, version 3.4.1
# Bibliothèque d'accès aux services Géoplateforme, version 3.4.2

**16/04/2024 : 3.4.1**
**14/05/2024 : 3.4.2**

> release of geoportal access library
## Summary

Corrections mineures sur le logger et le build
Corrections sur le paramètrage du service d'isochrone et la normalisation des URL des services images

## Changelog

Expand All @@ -18,8 +18,8 @@ Corrections mineures sur le logger et le build

* [Fixed]

- remplace dépendance xmldom par @xmldom/xmldom (ba127d66030d632ce5058ce7274013f531acbfcc)
- variable process utilisée par logger définie par défaut au cas où non présente dans l'environnement (e61330419a1ed86d32e36c66d3aec86062bc8860)
- Fix pour permettre des isodistances de plus de 50km (96ff3800e43e2b609208c8492cad2a8994997a6c)
- Fix pour correctement normaliser les URL ayant plusieurs point d'interrogation (#88)

* [Deprecated]

Expand Down
Binary file removed geoportal-access-lib-3.4.1.tgz
Binary file not shown.
Binary file added geoportal-access-lib-3.4.2.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "geoportal-access-lib",
"version": "3.4.1",
"date": "16/04/2024",
"version": "3.4.2",
"date": "14/05/2024",
"description": "French Geoportal resources access library",
"module": "src/Gp.js",
"main": "dist/GpServices-src.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ function ProcessIsoCurveParam (options) {
if (this.options.method === "distance") {
this.costType = "distance";
this.costValue = this.options.distance;
if (this.distanceUnit === "m" && this.costValue >= 50000) {
this.distanceUnit = "km";
this.costValue /= 1000;
}
} else {
this.costType = "time";
this.costValue = this.options.time;
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/Helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ var Helper = {
var myUrl = url;

if (url) {
if (url.split("?").length - 1 >= 2) {
// S'il y a plusieurs "?" dans l'URL, on garde le premier et on remplace les autres par des &
var firstOccuranceIndex = url.search(/\?/) + 1;
myUrl = url.substring(0, firstOccuranceIndex) + url.slice(firstOccuranceIndex).replace(/\?/g, "&");
}

var k = url.indexOf("?");
if (k === -1) { // pas de ? et KVP
myUrl += "?";
Expand Down

0 comments on commit bb40bf3

Please sign in to comment.