supprime une view
This commit is contained in:
parent
cf7a46a3ae
commit
31b31ce99e
@ -1,14 +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/
|
|
||||||
*/
|
|
||||||
|
|
@ -1,71 +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/
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Galerie d'image
|
|
||||||
* SLB est activé pour tout le site
|
|
||||||
*/
|
|
||||||
var b = new SimpleLightbox('.galleryGalleryPicture', {
|
|
||||||
captionSelector: "self",
|
|
||||||
captionType: "data",
|
|
||||||
captionsData: "caption",
|
|
||||||
closeText: "×"
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
// Démarre en mode plein écran
|
|
||||||
if ($("#pictureContainer").hasClass("fullScreen")) {
|
|
||||||
$('a#homePicture')[0].click();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Créer une carte Leaflet centrée sur une position par défaut
|
|
||||||
var map = L.map('map').setView([0, 0], 2);
|
|
||||||
|
|
||||||
// Ajouter une couche de tuiles OpenStreetMap à la carte
|
|
||||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
// Récupérer les données JSON des positions des images à partir de la donnée cachée dans le HTML
|
|
||||||
var jsonDataString = document.getElementById('imageData').value;
|
|
||||||
var jsonData = JSON.parse(jsonDataString);
|
|
||||||
|
|
||||||
// Créer un tableau pour stocker les marqueurs des images
|
|
||||||
var markers = [];
|
|
||||||
|
|
||||||
// Parcourir les données JSON et ajouter des marqueurs pour chaque image
|
|
||||||
Object.keys(jsonData).forEach(function (imageName) {
|
|
||||||
var image = jsonData[imageName];
|
|
||||||
var marker = L.marker([image.lat, image.long]).addTo(map);
|
|
||||||
markers.push(marker);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Calculer la moyenne des positions des images
|
|
||||||
var sumLat = 0;
|
|
||||||
var sumLong = 0;
|
|
||||||
Object.values(jsonData).forEach(function (image) {
|
|
||||||
sumLat += image.lat;
|
|
||||||
sumLong += image.long;
|
|
||||||
});
|
|
||||||
var avgLat = sumLat / Object.keys(jsonData).length;
|
|
||||||
var avgLong = sumLong / Object.keys(jsonData).length;
|
|
||||||
|
|
||||||
// Centrer la carte sur la moyenne des positions des images
|
|
||||||
map.setView([avgLat, avgLong]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
<div class="row <?php echo $module::$config['backAlign'] . ' ' . $module::$config['backPositionTop'];?>">
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::button('galleryGalleryBack', [
|
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
|
||||||
'value' => template::ico('left')
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="pictureContainer" class="row galleryRow <?php echo ($module::$config['fullScreen']);?> ">
|
|
||||||
<?php foreach($module::$pictures as $picture => $datas): ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<div id="map"></div>
|
|
||||||
<input type="hidden" id="imageData" value="<?php echo htmlspecialchars(json_encode($module::$pictures)); ?>">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="row <?php echo $module::$config['backAlign'] . ' ' . $module::$config['backPositionBottom'];?>">
|
|
||||||
<div class="col1">
|
|
||||||
<?php echo template::button('galleryGalleryBack', [
|
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
|
||||||
'value' => template::ico('left')
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
Loading…
Reference in New Issue
Block a user