Skip to content

Commit

Permalink
ajout mapprint et addlayers
Browse files Browse the repository at this point in the history
  • Loading branch information
lecault committed Oct 18, 2024
1 parent e3ff448 commit b2eb540
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
19 changes: 18 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,15 @@ <h1>
</div>
</div>
</li>

<li class="list-group-item advanced" style="display: none;">
<div class="list-flex">
<span i18n="tabs.app.opt_mapprint">Impression vue courante</span>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="checkboxes" id="opt-mapprint">
<label class="custom-control-label" for="opt-mapprint"></label>
</div>
</div>
</li>
<li class="list-group-item advanced" style="display: none;">
<div class="list-flex">
<span i18n="tabs.app.opt_studio">Ouvrir la carte dans le studio</span>
Expand All @@ -379,6 +387,15 @@ <h1>
</div>
</div>
</li>
<li class="list-group-item advanced" style="display: none;">
<div class="list-flex">
<span i18n="tabs.app.opt_addlayerstools">Panneau ajout de couches</span>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="checkboxes" id="opt-addlayerstools">
<label class="custom-control-label" for="opt-addlayerstools"></label>
</div>
</div>
</li>
</ul>
</div>
<div class="col-md-6">
Expand Down
4 changes: 4 additions & 0 deletions js/mviewerstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ var newConfiguration = function (infos) {
"opt-showhelp",
"opt-coordinates",
"opt-togglealllayersfromtheme",
"opt-mapprint",
"opt-addlayerstools",
"SwitchCustomBackground",
"SwitchAdvanced",
].forEach((id) => {
Expand Down Expand Up @@ -751,6 +753,8 @@ var getConfig = () => {
'togglealllayersfromtheme="' +
($("#opt-togglealllayersfromtheme").prop("checked") === true) +
'"',
'mapprint="' + ($("#opt-mapprint").prop("checked") === true) + '"',
'addlayerstools="' + ($("#opt-addlayerstools").prop("checked") === true) + '"',
];

config.title = $("#opt-title").val();
Expand Down
2 changes: 2 additions & 0 deletions lib/mv.js
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,8 @@ var mv = (function () {
"geoloc",
"initialextenttool",
"togglealllayersfromtheme",
"mapprint",
"addlayerstools",
].forEach(function (value, id) {
if (application.attr(value) && application.attr(value) === "true") {
$("#opt-" + value).prop("checked", true);
Expand Down
4 changes: 4 additions & 0 deletions mviewerstudio.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"tabs.app.opt_coords": "Affichage des coordonnées au clic",
"tabs.app.opt_mouseposition": "Afficher les coordonnées correspondant à la position de la souris",
"tabs.app.opt_data": "Afficher/masquer toutes les données d'une thématique",
"tabs.app.opt_mapprint": "Impression de la vue courante depuis le navigateur",
"tabs.app.opt_addlayerstools": "Activer le panneau pour ajouter des couches WMS",
"tabs.app.opt_geoloc": "Se géolocaliser",
"tabs.app.opt_studio": "Ouvrir la carte dans le studio",
"tabs.app.map_title": "Options de la carte",
Expand Down Expand Up @@ -790,6 +792,8 @@
"tabs.app.opt_coords": "Display coordinates on click",
"tabs.app.opt_mouseposition": "Display the coordinates corresponding to the mouse position",
"tabs.app.opt_data": "Show/hide all data for a theme",
"tabs.app.opt_mapprint": "Printing the current view from the browser",
"tabs.app.opt_addlayerstools": "Activate the panel for adding WMS layers",
"tabs.app.opt_geoloc": "Geolocate",
"tabs.app.opt_studio": "Open map in mviewerstudio",
"tabs.app.map_title": "Map options",
Expand Down

0 comments on commit b2eb540

Please sign in to comment.