Skip to content

Commit

Permalink
feat(Services): PROD GPF pour Geocodage/Reverse/Autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
elias75015 committed Oct 26, 2023
1 parent 46ca76d commit 89f3360
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
7 changes: 2 additions & 5 deletions src/Services/AutoComplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,10 @@ function AutoComplete (options_) {
var options = this.patchOptionConvertor(options_);

if (!options.serverUrl) {
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocomplétion
/* options.serverUrl = DefaultUrlService.AutoComplete.newUrl();
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
18 changes: 12 additions & 6 deletions src/Services/DefaultUrlService.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ var DefaultUrlService = {
* @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.
*/
AutoComplete : {
new_key : "/completion",
new_key : "/geocodage/completion",

_key : "/calcul/geoportail/geocodage/rest/0.1/completion",

Expand All @@ -195,7 +195,9 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
return;
var NEW_AUTOCOMPLETE_HOSTNAME = "data.geopf.fr";

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

/**
Expand All @@ -213,7 +215,7 @@ var DefaultUrlService = {
* @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.
*/
ReverseGeocode : {
new_key : "/reverse",
new_key : "/geocodage/reverse",

_key : "/calcul/geoportail/geocodage/rest/0.1/reverse",

Expand All @@ -222,7 +224,9 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
return;
var NEW_REVERSE_GEOCODE_HOSTNAME = "data.geopf.fr";

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

/**
Expand All @@ -240,7 +244,7 @@ var DefaultUrlService = {
* @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.
*/
Geocode : {
new_key : "/search",
new_key : "/geocodage/search",

_key : "/calcul/geoportail/geocodage/rest/0.1/search",

Expand All @@ -249,7 +253,9 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
return;
var NEW_GEOCODE_HOSTNAME = "data.geopf.fr";

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

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

var options = this.patchOptionConvertor(options_);
if (!options.serverUrl) {
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage
/* options.serverUrl = DefaultUrlService.Geocode.newUrl();
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: 2 additions & 5 deletions src/Services/Geocode/ReverseGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,10 @@ function ReverseGeocode (options_) {

var options = this.patchOptionConvertor(options_);
if (!options.serverUrl) {
// Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse
/* options.serverUrl = DefaultUrlService.ReverseGeocode.newUrl();
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

0 comments on commit 89f3360

Please sign in to comment.