removed the color legend; seemed not needed and cluttered view
This commit is contained in:
@@ -59,9 +59,6 @@ function initializeMap() {
|
||||
imperial: false
|
||||
}).addTo(map);
|
||||
|
||||
// Add legend
|
||||
addLegend();
|
||||
|
||||
// Hide loading overlay
|
||||
document.getElementById('loading').classList.add('hidden');
|
||||
}
|
||||
@@ -128,41 +125,6 @@ function getSupportLevelText(level) {
|
||||
}
|
||||
}
|
||||
|
||||
// Add legend to the map
|
||||
function addLegend() {
|
||||
const legend = L.control({ position: 'bottomright' });
|
||||
|
||||
legend.onAdd = function(map) {
|
||||
const div = L.DomUtil.create('div', 'map-legend');
|
||||
div.innerHTML = `
|
||||
<h4>Support Levels</h4>
|
||||
<div class="legend-item">
|
||||
<span class="legend-color" style="background-color: #27ae60;"></span>
|
||||
<span>1 - Strong Support</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="legend-color" style="background-color: #f1c40f;"></span>
|
||||
<span>2 - Moderate Support</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="legend-color" style="background-color: #e67e22;"></span>
|
||||
<span>3 - Low Support</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="legend-color" style="background-color: #e74c3c;"></span>
|
||||
<span>4 - No Support</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<span class="legend-color" style="background-color: #95a5a6;"></span>
|
||||
<span>Not Specified</span>
|
||||
</div>
|
||||
`;
|
||||
return div;
|
||||
};
|
||||
|
||||
legend.addTo(map);
|
||||
}
|
||||
|
||||
// Set up geo field synchronization
|
||||
function setupGeoFieldSync() {
|
||||
const latInput = document.getElementById('location-lat');
|
||||
@@ -516,13 +478,13 @@ function toggleAddLocation() {
|
||||
const crosshair = document.getElementById('crosshair');
|
||||
|
||||
if (isAddingLocation) {
|
||||
btn.textContent = '✕ Cancel';
|
||||
btn.innerHTML = '<span class="btn-icon">✕</span><span class="btn-text">Cancel</span>';
|
||||
btn.classList.remove('btn-success');
|
||||
btn.classList.add('btn-secondary');
|
||||
crosshair.classList.remove('hidden');
|
||||
map.getContainer().style.cursor = 'crosshair';
|
||||
} else {
|
||||
btn.textContent = '➕ Add Location Here';
|
||||
btn.innerHTML = '<span class="btn-icon">➕</span><span class="btn-text">Add Location Here</span>';
|
||||
btn.classList.remove('btn-secondary');
|
||||
btn.classList.add('btn-success');
|
||||
crosshair.classList.add('hidden');
|
||||
@@ -866,7 +828,7 @@ function toggleFullscreen() {
|
||||
if (!document.fullscreenElement) {
|
||||
app.requestFullscreen().then(() => {
|
||||
app.classList.add('fullscreen');
|
||||
btn.textContent = '✕ Exit Fullscreen';
|
||||
btn.innerHTML = '<span class="btn-icon">✕</span><span class="btn-text">Exit Fullscreen</span>';
|
||||
|
||||
// Invalidate map size after transition
|
||||
setTimeout(() => map.invalidateSize(), 300);
|
||||
@@ -876,7 +838,7 @@ function toggleFullscreen() {
|
||||
} else {
|
||||
document.exitFullscreen().then(() => {
|
||||
app.classList.remove('fullscreen');
|
||||
btn.textContent = '⛶ Fullscreen';
|
||||
btn.innerHTML = '<span class="btn-icon">⛶</span><span class="btn-text">Fullscreen</span>';
|
||||
|
||||
// Invalidate map size after transition
|
||||
setTimeout(() => map.invalidateSize(), 300);
|
||||
|
||||
Reference in New Issue
Block a user