Skip to content

Commit

Permalink
release 3.3.4-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
elias75015 committed Sep 21, 2023
1 parent bb53296 commit 4d50a92
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 41 deletions.
Binary file removed geoportal-access-lib-3.3.3.tgz
Binary file not shown.
Binary file added geoportal-access-lib-3.4.0-beta.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.3.3",
"date": "29/08/2023",
"version": "3.4.0-beta",
"date": "21/09/2023",
"description": "French Geoportal resources access library",
"module": "src/Gp.js",
"main": "dist/GpServices-src.js",
Expand Down
7 changes: 5 additions & 2 deletions src/Services/Alti/Alti.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,13 @@ function Alti (options) {
// en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)
// ainsi que sur le type de service (profil ou elevation)
if (!this.options.serverUrl) {
var lstUrlByDefault = DefaultUrlService.Alti.newUrl();
// Code commenté pour Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti
/* var lstUrlByDefault = DefaultUrlService.Alti.newUrl();
if (this.options.oldAltiService) {
lstUrlByDefault = DefaultUrlService.Alti.url();
}
}*/
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti
var lstUrlByDefault = DefaultUrlService.Alti.url();
var urlFound = null;
switch (this.options.api) {
case "WPS":
Expand Down
7 changes: 5 additions & 2 deletions src/Services/AutoComplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ function AutoComplete (options_) {
var options = this.patchOptionConvertor(options_);

if (!options.serverUrl) {
options.serverUrl = DefaultUrlService.AutoComplete.newUrl();
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocomplétion
/* options.serverUrl = DefaultUrlService.AutoComplete.newUrl();
if (options.oldAutocompleteService) {
options.serverUrl = DefaultUrlService.AutoComplete.url();
}
} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocompletion
options.serverUrl = DefaultUrlService.AutoComplete.url();
}

// appel du constructeur par heritage
Expand Down
30 changes: 6 additions & 24 deletions src/Services/DefaultUrlService.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_ALTI_HOSTNAME = "geoplateforme-gpf-apim.qua.gpf-tech.ign.fr";

return {
// rest
"elevation-json" : DefaultUrlService.newUrl(this.new_key["elevation-json"], NEW_ALTI_HOSTNAME),
"elevation-xml" : DefaultUrlService.newUrl(this.new_key["elevation-xml"], NEW_ALTI_HOSTNAME),
"profil-json" : DefaultUrlService.newUrl(this.new_key["profil-json"], NEW_ALTI_HOSTNAME),
"profil-xml" : DefaultUrlService.newUrl(this.new_key["profil-xml"], NEW_ALTI_HOSTNAME)
};
return;
},
/**
* url from wxs service
Expand Down Expand Up @@ -150,9 +142,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_ISO_HOSTNAME = "geoplateforme-gpf-apim.qua.gpf-tech.ign.fr";

return DefaultUrlService.newUrl(this.new_key, NEW_ISO_HOSTNAME);
return;
},

/**
Expand Down Expand Up @@ -205,9 +195,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_AUTOCOMPLETE_HOSTNAME = "geoplateforme-gpf-geocodeur.qua.gpf-tech.ign.fr"

return DefaultUrlService.newUrl(this.new_key, NEW_AUTOCOMPLETE_HOSTNAME);
return;
},

/**
Expand All @@ -234,9 +222,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_REVERSE_GEOCODE_HOSTNAME = "geoplateforme-gpf-geocodeur.qua.gpf-tech.ign.fr"

return DefaultUrlService.newUrl(this.new_key, NEW_REVERSE_GEOCODE_HOSTNAME);
return;
},

/**
Expand All @@ -263,9 +249,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_GEOCODE_HOSTNAME = "geoplateforme-gpf-geocodeur.qua.gpf-tech.ign.fr"

return DefaultUrlService.newUrl(this.new_key, NEW_GEOCODE_HOSTNAME);
return;
},

/**
Expand All @@ -292,9 +276,7 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_ITI_HOSTNAME = "geoplateforme-gpf-apim.qua.gpf-tech.ign.fr";

return DefaultUrlService.newUrl(this.new_key, NEW_ITI_HOSTNAME);
return;
},

/**
Expand Down
7 changes: 5 additions & 2 deletions src/Services/Geocode/Geocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ function Geocode (options_) {

var options = this.patchOptionConvertor(options_);
if (!options.serverUrl) {
options.serverUrl = DefaultUrlService.Geocode.newUrl();
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage
/* options.serverUrl = DefaultUrlService.Geocode.newUrl();
if (options.oldGeocodeService) {
options.serverUrl = DefaultUrlService.Geocode.url();
}
} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage
options.serverUrl = DefaultUrlService.Geocode.url();
}

// appel du constructeur par heritage
Expand Down
7 changes: 5 additions & 2 deletions src/Services/Geocode/ReverseGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ function ReverseGeocode (options_) {

var options = this.patchOptionConvertor(options_);
if (!options.serverUrl) {
options.serverUrl = DefaultUrlService.ReverseGeocode.newUrl();
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse
/* options.serverUrl = DefaultUrlService.ReverseGeocode.newUrl();
if (options.oldReverseService) {
options.serverUrl = DefaultUrlService.ReverseGeocode.url();
}
} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse
options.serverUrl = DefaultUrlService.ReverseGeocode.url();
}

// appel du constructeur par heritage
Expand Down
10 changes: 6 additions & 4 deletions src/Services/ProcessIsoCurve/ProcessIsoCurve.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function ProcessIsoCurve (options) {

// options par defaut du service
// TODO: modifier la ressource lors de la mise en production du service
this.options.resource = options.resource || "valhalla77";
this.options.resource = options.resource || "bdtopo-iso";
this.options.exclusions = options.exclusions || [];
this.options.reverse = options.reverse || false;
this.options.srs = options.srs || "EPSG:4326";
Expand Down Expand Up @@ -246,11 +246,13 @@ function ProcessIsoCurve (options) {
// gestion de l'url du service par defaut
// si l'url n'est pas renseignée, il faut utiliser les urls par defaut
if (!this.options.serverUrl) {
var urlFound = DefaultUrlService.ProcessIsoCurve.newUrl();
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone
/* var urlFound = DefaultUrlService.ProcessIsoCurve.newUrl();
if (this.options.oldIsoService) {
urlFound = DefaultUrlService.ProcessIsoCurve.url();
}

} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone
var urlFound = DefaultUrlService.ProcessIsoCurve.url();
if (!urlFound) {
throw new Error("Url by default not found !");
}
Expand Down
9 changes: 6 additions & 3 deletions src/Services/Route/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Route (options) {
}
this.options.outputFormat = "json";

this.options.resource = options.resource || "osrm77";
this.options.resource = options.resource || "bdtopo-osrm";
this.options.startPoint = options.startPoint;
this.options.endPoint = options.endPoint;
this.options.viaPoints = options.viaPoints || [];
Expand Down Expand Up @@ -231,10 +231,13 @@ function Route (options) {
// gestion de l'url du service par defaut
// si l'url n'est pas renseignée, il faut utiliser les urls par defaut
if (!this.options.serverUrl) {
var UrlByDefault = DefaultUrlService.Route.newUrl();
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire
/* var UrlByDefault = DefaultUrlService.Route.newUrl();
if (this.options.oldRouteService) {
UrlByDefault = DefaultUrlService.Route.url();
}
} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire
var UrlByDefault = DefaultUrlService.Route.url();

if (!UrlByDefault) {
throw new Error("Url by default not found !");
Expand Down

0 comments on commit 4d50a92

Please sign in to comment.