Supprime index.css
This commit is contained in:
parent
d09cf976a6
commit
e1f751cf4b
@ -1,22 +0,0 @@
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
#map {
|
||||
height: 500px;
|
||||
width: auto;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
@ -12,17 +12,18 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// Centrage de la carte et niveau de zoom
|
||||
const jsonOptions = '<?php echo json_encode($module::$galleriesCenter); ?>';
|
||||
const objOptions = JSON.parse(jsonOptions);
|
||||
// Centrage de la carte et niveau de zoom
|
||||
const jsonOptions = '<?php echo json_encode($module::$galleriesCenter); ?>';
|
||||
const objOptions = JSON.parse(jsonOptions);
|
||||
|
||||
// Initialisation de la carte
|
||||
var map = L.map('map').setView([objOptions.lat, objOptions.long], objOptions.zoom - 1);
|
||||
|
||||
// Ajouter une couche de tuiles OpenStreetMap
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
@ -30,14 +31,17 @@ const objOptions = JSON.parse(jsonOptions);
|
||||
const json = '<?php echo json_encode($module::$galleries); ?>';
|
||||
const obj = JSON.parse(json);
|
||||
|
||||
|
||||
|
||||
// Ajouter les marqueurs à la carte
|
||||
obj.forEach(function(location) {
|
||||
var marker = L.marker([location.lat, location.long], {title: location.label});
|
||||
obj.forEach(function (location) {
|
||||
var marker = L.marker([location.lat, location.long], {
|
||||
title: location.label
|
||||
});
|
||||
marker.addTo(map);
|
||||
marker.bindPopup('<p>' + location.label + '</p><a href="' + location.img + '" data-lity><img src="' + location.thumb + '" alt="Thumbnail" class="thumbnail"></a>',{
|
||||
marker.bindPopup('<p>' + location.label + '</p><a href="' + location.img + '" data-lity><img src="' + location.thumb + '" alt="Thumbnail" class="thumbnail"></a>', {
|
||||
minWidth: 150,
|
||||
maxWidth: 150,
|
||||
minHeight: 150
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
|
||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
#map {
|
||||
height: 500px;
|
||||
width: auto;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
@ -12,43 +12,45 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// Centrage de la carte et niveau de zoom
|
||||
const jsonOptions = '<?php echo json_encode($module::$locationsCenter); ?>';
|
||||
const objOptions = JSON.parse(jsonOptions);
|
||||
// Centrage de la carte et niveau de zoom
|
||||
const jsonOptions = '<?php echo json_encode($module::$locationsCenter); ?>';
|
||||
const objOptions = JSON.parse(jsonOptions);
|
||||
|
||||
// Initialisation de la carte
|
||||
var map = L.map('map').setView([objOptions.lat, objOptions.long], objOptions.zoom - 1);
|
||||
// Initialisation de la carte
|
||||
var map = L.map('map').setView([objOptions.lat, objOptions.long], objOptions.zoom - 1);
|
||||
|
||||
// Ajouter une couche de tuiles OpenStreetMap
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
// Ajouter une couche de tuiles OpenStreetMap
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
// Les données PHP converties en JSON pour JavaScript
|
||||
const json = '<?php echo json_encode($module::$locations); ?>';
|
||||
const obj = JSON.parse(json);
|
||||
// Les données PHP converties en JSON pour JavaScript
|
||||
const json = '<?php echo json_encode($module::$locations); ?>';
|
||||
const obj = JSON.parse(json);
|
||||
|
||||
|
||||
|
||||
const encodedHtml = '<p><span style="color: #e03e2d;">La maison vendue !</span></p>';
|
||||
const decodedHtml = decodeHtmlEntities(encodedHtml);
|
||||
const encodedHtml = '<p><span style="color: #e03e2d;">La maison vendue !</span></p>';
|
||||
const decodedHtml = decodeHtmlEntities(encodedHtml);
|
||||
|
||||
// Ajouter les marqueurs à la carte
|
||||
obj.forEach(function (location) {
|
||||
const descriptiondecodedHtml = decodeHtmlEntities(location.description);
|
||||
var marker = L.marker([location.lat, location.long], {
|
||||
title: location.name
|
||||
});
|
||||
//console.log(location.description);
|
||||
marker.addTo(map);
|
||||
marker.bindPopup( location.name + descriptiondecodedHtml);
|
||||
});
|
||||
// Ajouter les marqueurs à la carte
|
||||
obj.forEach(function (location) {
|
||||
const descriptiondecodedHtml = decodeHtmlEntities(location.description);
|
||||
var marker = L.marker([location.lat, location.long], {
|
||||
title: location.name
|
||||
});
|
||||
//console.log(location.description);
|
||||
marker.addTo(map);
|
||||
marker.bindPopup(location.name + descriptiondecodedHtml);
|
||||
});
|
||||
|
||||
// Fonction pour décoder les entités HTML
|
||||
function decodeHtmlEntities(encodedString) {
|
||||
const txt = document.createElement('textarea');
|
||||
txt.innerHTML = encodedString;
|
||||
return txt.value;
|
||||
}
|
||||
// Fonction pour décoder les entités HTML
|
||||
function decodeHtmlEntities(encodedString) {
|
||||
const txt = document.createElement('textarea');
|
||||
txt.innerHTML = encodedString;
|
||||
return txt.value;
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user