diff --git a/static/index.html b/static/index.html index b4be649..0b9600a 100644 --- a/static/index.html +++ b/static/index.html @@ -35,7 +35,7 @@ /* Slider panel (top-left, below controls, stations mode only) */ #slider-panel { - position: fixed; top: 56px; left: 56px; + position: fixed; top: 70px; left: 56px; background: white; padding: 10px 14px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index: 2000; font-size: 13px; min-width: 260px; @@ -61,6 +61,15 @@ } .legend-labels { display: flex; justify-content: space-between; font-size: 11px; color: #666; } #stats { margin-top: 8px; font-size: 11px; color: #888; } + + /* Gas pump markers */ + .pump-icon { + filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); + transition: transform 0.1s; + } + .pump-icon:hover { + transform: scale(1.3); + } @@ -216,14 +225,16 @@ count++; const color = priceColor(s.regular, minPrice, maxPrice); - const marker = L.circleMarker([s.lat, s.lng], { - radius: 7, - fillColor: color, - color: '#fff', - weight: 1.5, - fillOpacity: 0.9, + const icon = L.divIcon({ + html: pumpSvg(color), + className: '', + iconSize: [20, 24], + iconAnchor: [10, 24], + popupAnchor: [0, -24], }); + const marker = L.marker([s.lat, s.lng], { icon }); + let popup = `${s.name}
`; popup += `${s.brand}
`; popup += `${s.address}
`; @@ -238,6 +249,23 @@ document.getElementById('visible-count').textContent = count + ' / ' + allStations.length + ' stations'; } + function pumpSvg(fill) { + return ` + + + + + + + + + + + + + `; + } + function priceColor(price, min, max) { const t = Math.max(0, Math.min(1, (price - min) / (max - min))); const colors = [