diff options
-rw-r--r-- | map.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -6,13 +6,22 @@ var OSMLayer = L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { att var Box = L.latLngBounds( [[54.5, 8.0],[57.8, 15.3]] ); // GeoJSON feature styling and grouping +function typecolor(type) { + if (type == "center") { return ('darkgreen'); } + else if (type == 'center-begin') { return ('green'); } + else if (type == 'member') { return ('orange'); } + else if (type == 'diploma') { return ('red'); } + else if (type == 'diploma-aspiring') { return ('blue'); } + else { return ('black'); }; +}; function returnFeatureMarker(feature, latlng) { var hasPopup = (feature.properties.location && feature.properties.type); - return L.marker(latlng, { + return L.circleMarker(latlng, { title: feature.properties.title, zIndexOffset: 1000*feature.properties.priority || 0, clickable: hasPopup, - keyboard: hasPopup + keyboard: hasPopup, + color: typecolor(feature.properties.type) }); }; function addFeaturePopup(feature, layer) { |