[Lizmap] function removeMetadataElements() {
Philippe CIANFARANI
sig at scot-hautegironde.fr
Thu Jun 27 05:29:37 PDT 2024
Hello everyone,
I want to remove the information related to the extent, the projection,
and the WMS service from the Lizmap popup when a map is launched.
I therefore have the following JavaScript :
/"lizMap.events.on({
'uicreated': function(evt) {
var html = '';
html += '<div class="modal-header"><a class="close"
data-dismiss="modal">×</a><p style="text-align: center;
font-weight: bold;">Pour afficher les valeurs, cliquez sur les
différents points de mesures.</p></div>';
html += '<div>'; // Ouverture du conteneur des logos
html += '<img
src="http*********************************************************************=media/images/CCE.jpg"
style="float: left; margin-right: 10px;">'; // Logo à gauche
html += '</div>'; // Fermeture du conteneur des logos
html += '<div class="modal-body">';
html += $('#metadata').html();
html += '</div>';
html += '<div class="modal-footer"><button id="button_OK"
type="button" class="btn btn-default" data-dismiss="modal">Ok
(⏎)</button></div>';
$('#lizmap-modal').html(html).modal('show');
// Fonction pour enlever les éléments spécifiques
function removeMetadataElements() {
$('#lizmap-modal .modal-body .projection, #lizmap-modal
.modal-body .emprise, #lizmap-modal .modal-body .wms-service').remove();
}
// Vérifier et enlever les éléments après un délai
setTimeout(removeMetadataElements, 500);
$('#lizmap-modal').keypress(function(e) {
if (e.which == 13) { // Touche Entrée
$('#button_OK').click();
}
});
}
});/"
But this script does not work. Does anyone have an idea?
Thanks in advance,
--
Philippe CIANFARANI
Chef de projet SIG
Syndicat Mixte du SCoT de la Haute Gironde Blaye - Estuaire
Maison des Services au Public
32 rue des Maçons - BP 134
33391 Blaye Cedex
05.57.94.11.87/06.51.10.97.86
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20240627/9524bdd2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d??cran 2024-06-27 142636.png
Type: image/png
Size: 26475 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20240627/9524bdd2/attachment-0001.png>
More information about the Lizmap
mailing list