change vectory tiles

This commit is contained in:
Tykayn 2025-09-23 11:26:44 +02:00 committed by tykayn
parent 1a3df2ed75
commit 91e34032b2
9 changed files with 47 additions and 42 deletions

View file

@ -241,7 +241,7 @@ class DemoResource:
// Initialize the map // Initialize the map
const map = new maplibregl.Map({{ const map = new maplibregl.Map({{
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], // Default center (center of metropolitan France) center: [2.2137, 46.2276], // Default center (center of metropolitan France)
zoom: 5 zoom: 5
}}); }});
@ -916,7 +916,7 @@ class DemoResource:
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.3522, 48.8566], // Default center (Paris) center: [2.3522, 48.8566], // Default center (Paris)
zoom: 4 zoom: 4
}); });
@ -1153,7 +1153,7 @@ class DemoResource:
// Initialize results map // Initialize results map
const resultsMap = new maplibregl.Map({ const resultsMap = new maplibregl.Map({
container: 'resultsMap', container: 'resultsMap',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.3522, 48.8566], // Default center (Paris) center: [2.3522, 48.8566], // Default center (Paris)
zoom: 4 zoom: 4
}); });
@ -1494,7 +1494,7 @@ class DemoResource:
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.3522, 48.8566], // Default center (Paris) center: [2.3522, 48.8566], // Default center (Paris)
zoom: 4 zoom: 4
}); });

View file

@ -178,7 +178,7 @@ class DemoMainResource:
<script> <script>
// Map style URLs // Map style URLs
const mapStyles = { const mapStyles = {
default: 'https://demotiles.maplibre.org/style.json', default: 'https://tiles.openfreemap.org/styles/liberty',
osmVector: 'https://cdn.jsdelivr.net/gh/openmaptiles/osm-bright-gl-style@master/style-cdn.json', osmVector: 'https://cdn.jsdelivr.net/gh/openmaptiles/osm-bright-gl-style@master/style-cdn.json',
osmRaster: { osmRaster: {
version: 8, version: 8,

View file

@ -510,4 +510,9 @@ input:invalid,
select:invalid { select:invalid {
border-color: #f44336; border-color: #f44336;
background-color: #fff8f8; background-color: #fff8f8;
}
.maplibregl-popup-content{
min-width: 300px;
max-width: 95vw;
} }

View file

@ -37,7 +37,7 @@ function initTabs() {
function initMap() { function initMap() {
map = new maplibregl.Map({ map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], center: [2.2137, 46.2276],
zoom: 5 zoom: 5
}); });

View file

@ -49,7 +49,7 @@
<script> <script>
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'mapDiv', container: 'mapDiv',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.3522, 48.8566], center: [2.3522, 48.8566],
zoom: 4 zoom: 4
}); });

View file

@ -194,37 +194,37 @@
<form id="trafficForm"> <form id="trafficForm">
<div class="form-group"> <div class="form-group">
<label for="photo">Photo (optionnelle)</label> <!-- <label for="photo">Photo (optionnelle)</label>-->
<input type="file" id="photo" name="photo" accept="image/*" capture="environment"> <!-- <input type="file" id="photo" name="photo" accept="image/*" capture="environment">-->
<div class="note">Prenez une photo géolocalisée de la situation (mobile recommandé)</div> <!-- <div class="note">Prenez une photo géolocalisée de la situation (mobile recommandé)</div>-->
<div id="photoPreviewContainer" style="margin-top:8px; display:none;"> <!-- <div id="photoPreviewContainer" style="margin-top:8px; display:none;">-->
<img id="photoPreview" alt="Aperçu photo" style="max-width:100%; border-radius:4px;"/> <!-- <img id="photoPreview" alt="Aperçu photo" style="max-width:100%; border-radius:4px;"/>-->
</div> <!-- </div>-->
<div class="form-row" style="margin-top:8px;"> <!-- <div class="form-row" style="margin-top:8px;">-->
<div class="form-group"> <!-- <div class="form-group">-->
<label for="panoramaxTokenInput">Token Panoramax</label> <!-- <label for="panoramaxTokenInput">Token Panoramax</label>-->
<input type="password" id="panoramaxTokenInput" placeholder="Jeton d'API Panoramax"> <!-- <input type="password" id="panoramaxTokenInput" placeholder="Jeton d'API Panoramax">-->
<div class="note">Stocké en local sur cet appareil. Utilisé pour envoyer la photo.</div> <!-- <div class="note">Stocké en local sur cet appareil. Utilisé pour envoyer la photo.</div>-->
</div> <!-- </div>-->
<div class="form-group" style="align-self:flex-end;"> <!-- <div class="form-group" style="align-self:flex-end;">-->
<button type="button" id="savePanoramaxTokenBtn">Enregistrer le token</button> <!-- <button type="button" id="savePanoramaxTokenBtn">Enregistrer le token</button>-->
<button type="button" id="showPanoramaxTokenBtn" style="display:none;">Modifier le token</button> <!-- <button type="button" id="showPanoramaxTokenBtn" style="display:none;">Modifier le token</button>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="camera-block"> <!-- <div class="camera-block">-->
<label>Prendre une photo avec la caméra</label> <!-- <label>Prendre une photo avec la caméra</label>-->
<div class="camera-controls"> <!-- <div class="camera-controls">-->
<button type="button" id="startCameraBtn">Démarrer la caméra</button> <!-- <button type="button" id="startCameraBtn">Démarrer la caméra</button>-->
<button type="button" id="capturePhotoBtn" disabled>Prendre la photo</button> <!-- <button type="button" id="capturePhotoBtn" disabled>Prendre la photo</button>-->
<button type="button" id="stopCameraBtn" disabled>Arrêter</button> <!-- <button type="button" id="stopCameraBtn" disabled>Arrêter</button>-->
</div> <!-- </div>-->
<div class="camera-preview"> <!-- <div class="camera-preview">-->
<video id="cameraVideo" autoplay playsinline muted></video> <!-- <video id="cameraVideo" autoplay playsinline muted></video>-->
<canvas id="cameraCanvas" style="display:none;"></canvas> <!-- <canvas id="cameraCanvas" style="display:none;"></canvas>-->
</div> <!-- </div>-->
<div class="note">La photo capturée sera ajoutée au champ ci-dessus.</div> <!-- <div class="note">La photo capturée sera ajoutée au champ ci-dessus.</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label for="label" class="required">Description du problème</label> <label for="label" class="required">Description du problème</label>
<input type="text" id="label" name="label" placeholder="e.g., Large pothole on Highway A1" required> <input type="text" id="label" name="label" placeholder="e.g., Large pothole on Highway A1" required>
@ -344,7 +344,7 @@
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], // Default center (center of metropolitan France) center: [2.2137, 46.2276], // Default center (center of metropolitan France)
zoom: 5 zoom: 5
}); });

View file

@ -73,7 +73,7 @@
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], // Default center (center of metropolitan France) center: [2.2137, 46.2276], // Default center (center of metropolitan France)
zoom: 5 zoom: 5
}); });

View file

@ -227,7 +227,7 @@ class EventFormResource:
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], // Default center (center of metropolitan France) center: [2.2137, 46.2276], // Default center (center of metropolitan France)
zoom: 5 zoom: 5
}); });

View file

@ -40,7 +40,7 @@
// Initialize the map // Initialize the map
const map = new maplibregl.Map({ const map = new maplibregl.Map({
container: 'map', container: 'map',
style: 'https://demotiles.maplibre.org/style.json', style: 'https://tiles.openfreemap.org/styles/liberty',
center: [2.2137, 46.2276], // Default center (center of metropolitan France) center: [2.2137, 46.2276], // Default center (center of metropolitan France)
zoom: 5 zoom: 5
}); });