2026-04-14-1
This commit is contained in:
@@ -294,6 +294,11 @@
|
||||
<input type="checkbox" id="toggle-pois" checked onchange="updateLayers()" style="accent-color: var(--primary); width: 16px; height: 16px;">
|
||||
<span>عرض المعالم / Show POIs</span>
|
||||
</label>
|
||||
|
||||
<label style="display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; font-size: 13px;">
|
||||
<input type="checkbox" id="toggle-arrows" checked onchange="updateLayers()" style="accent-color: var(--primary); width: 16px; height: 16px;">
|
||||
<span>اتجاهات الشوارع / Street Directions</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- DB NAMES INDICATOR -->
|
||||
@@ -672,9 +677,15 @@
|
||||
function updateLayers() {
|
||||
const show3D = document.getElementById('toggle-3d').checked;
|
||||
const showPOIs = document.getElementById('toggle-pois').checked;
|
||||
const showArrows = document.getElementById('toggle-arrows').checked;
|
||||
|
||||
if (map.getLayer('3d-buildings')) {
|
||||
map.setLayoutProperty('3d-buildings', 'visibility', show3D ? 'visible' : 'none');
|
||||
// Toggle 3D Overture buildings
|
||||
if (map.getLayer('building-3d')) {
|
||||
map.setLayoutProperty('building-3d', 'visibility', show3D ? 'visible' : 'none');
|
||||
}
|
||||
// Show flat footprints when 3D is off
|
||||
if (map.getLayer('overture-building-footprint')) {
|
||||
map.setLayoutProperty('overture-building-footprint', 'visibility', show3D ? 'none' : 'visible');
|
||||
}
|
||||
|
||||
if (map.getLayer('intaleq-db-label')) {
|
||||
@@ -685,6 +696,18 @@
|
||||
if (map.getLayer('intaleq_pois')) {
|
||||
map.setLayoutProperty('intaleq_pois', 'visibility', showPOIs ? 'visible' : 'none');
|
||||
}
|
||||
|
||||
// Toggle places label layers + Overture name layers
|
||||
['places-syria-labels', 'places-jordan-labels', 'places-egypt-labels', 'overture-building-names', 'overture-street-names'].forEach(id => {
|
||||
if (map.getLayer(id)) {
|
||||
map.setLayoutProperty(id, 'visibility', showPOIs ? 'visible' : 'none');
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle street direction arrows
|
||||
if (map.getLayer('road-direction-arrows')) {
|
||||
map.setLayoutProperty('road-direction-arrows', 'visibility', showArrows ? 'visible' : 'none');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user