diff --git a/index.html b/index.html
index 9c8475f3..e4535585 100755
--- a/index.html
+++ b/index.html
@@ -658,6 +658,26 @@
diff --git a/js/mviewerstudio.js b/js/mviewerstudio.js
index 12c2beae..10f40c1e 100644
--- a/js/mviewerstudio.js
+++ b/js/mviewerstudio.js
@@ -750,13 +750,19 @@ var getConfig = () => {
if ($("#optProxyUrl").val() && _conf.proxy) {
savedProxy = `${padding(0)}`;
}
- var search_params = { bbox: false, localities: false, features: false, static: false };
+ var search_params = { bbox: false, localities: false, features: false, static: false, querymaponclick:false, closeafterclick:false };
if ($("#SwitchAdressSearch").is(":checked")) {
olscompletion = [
padding(0) + '',
].join(" ");
+ if ($("#search-querymaponclick").is(":checked")) {
+ search_params.querymaponclick = true;
+ }
+ if ($("#search-closeafterclick").is(":checked")) {
+ search_params.closeafterclick = true;
+ }
search_params.localities = true;
}
if (
@@ -792,6 +798,10 @@ var getConfig = () => {
search_params.features +
'" static="' +
search_params.static +
+ '" querymaponclick="' +
+ search_params.querymaponclick +
+ '" closeafterclick="' +
+ search_params.closeafterclick +
'"/>';
var maxextentStr = "";
diff --git a/lib/mv.js b/lib/mv.js
index 5b351842..4a8357d0 100755
--- a/lib/mv.js
+++ b/lib/mv.js
@@ -1146,6 +1146,8 @@ var mv = (function () {
$("#opt-searchl-attribution").hide();
$("#opt-searchlocalities-url").val("");
$("#opt-searchlocalities-attribution").val("");
+ $("#search-querymaponclick").hide();
+ $("#search-closeafterclick").hide();
break;
case "ban":
$("#opt-searchl-url").show();
@@ -1153,12 +1155,16 @@ var mv = (function () {
// TODO : need to get values from config
$("#opt-searchlocalities-url").val("https://api-adresse.data.gouv.fr/search/");
$("#opt-searchlocalities-attribution").val("Base adresse nationale (BAN)");
+ $("#search-querymaponclick").show();
+ $("#search-closeafterclick").show();
break;
case "custom":
$("#opt-searchlocalities-url").val("");
$("#opt-searchl-url").show();
$("#opt-searchl-attribution").show();
$("#opt-searchlocalities-attribution").val("");
+ $("#search-querymaponclick").show();
+ $("#search-closeafterclick").show();
break;
}
},
@@ -1472,6 +1478,13 @@ var mv = (function () {
if (olscompletion && olscompletion.attr("attribution")) {
$("#opt-searchlocalities-attribution").val(olscompletion.attr("attribution"));
}
+ if (olscompletion && olscompletion.attr("querymaponclick")) {
+ $("#search-querymaponclick").val(olscompletion.attr("querymaponclick"));
+ }
+ if (olscompletion && olscompletion.attr("closeafterclick")) {
+ $("#search-closeafterclick").val(olscompletion.attr("closeafterclick"));
+ }
+
var elasticsearch = $(xml).find("elasticsearch");
if (elasticsearch && elasticsearch.attr("url")) {
$("#frm-globalsearch").val("elasticsearch").trigger("change");
diff --git a/mviewerstudio.i18n.json b/mviewerstudio.i18n.json
index 8c1d21ea..c1db0317 100644
--- a/mviewerstudio.i18n.json
+++ b/mviewerstudio.i18n.json
@@ -130,6 +130,8 @@
"tabs.app.search.address_search.url": "URL",
"tabs.app.search.address_search.attribution": "Attribution",
"tabs.app.search.address_search.attribution.ph": "Attribution du service",
+ "tabs.app.search.querymaponclick": "Interrogation de la carte après clic",
+ "tabs.app.search.closeafterclick": "Ferme la liste de résultat après clic",
"tabs.adv.title": "Fonctionnalités avancées",
"tabs.adv.alert": "Le paramétrage de cette section est optionnel.",
"tabs.versions.title": "Gérer les version de la carte",
@@ -856,6 +858,8 @@
"tabs.app.search.address_search.url": "URL",
"tabs.app.search.address_search.attribution": "Attribution",
"tabs.app.search.address_search.attribution.ph": "Service attribution",
+ "tabs.app.search.querymaponclick": "Querying the map after clicking",
+ "tabs.app.search.closeafterclick": "Closes the result list after clicking",
"tabs.data.themespanel.subtitle": "Create, import and manage themes and data",
"tabs.adv.title": "Advanced features",
"tabs.adv.alert": "These parameters are optional",