load scores every 5 minutes and display a colored map
This commit is contained in:
8
map.html
8
map.html
@ -12,13 +12,7 @@
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
function style(feature) {
|
||||
// Customize color based on a feature property; e.g., 'type' or 'category'
|
||||
switch(feature.properties.type) {
|
||||
case 'park': return { color: '#228B22' }; // green
|
||||
case 'water': return { color: '#1E90FF' }; // blue
|
||||
case 'residential': return { color: '#FFD700' }; // gold
|
||||
default: return { color: '#FF0000' }; // red fallback
|
||||
}
|
||||
return { color: feature.properties.color};
|
||||
}
|
||||
var map = L.map('map').setView([47.6062, -122.3321], 12);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
|
||||
Reference in New Issue
Block a user