summaryrefslogtreecommitdiff
path: root/chimere/static
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/static')
-rw-r--r--chimere/static/chimere/js/jquery.chimere-leaflet.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/chimere/static/chimere/js/jquery.chimere-leaflet.js b/chimere/static/chimere/js/jquery.chimere-leaflet.js
index 569f9f5..5e0e811 100644
--- a/chimere/static/chimere/js/jquery.chimere-leaflet.js
+++ b/chimere/static/chimere/js/jquery.chimere-leaflet.js
@@ -125,12 +125,21 @@ See the file COPYING for details.
layer.bindPopup(feature.properties.name);
},
pointToLayer: function (feature, latlng) {
- if (feature.properties.weigthed){
+ if (feature.properties.weight){
+ var fill_color = "#ff7800";
+ if (feature.properties.colors){
+ var idx = feature.properties.weight/5;
+ if (idx < feature.properties.colors.length){
+ fill_color = feature.properties.colors[idx];
+ } else {
+ fill_color = feature.properties.colors[feature.properties.colors.length-1];
+ }
+ }
var geojsonMarkerOptions = {
- radius: 8,
- fillColor: "#ff7800",
+ radius: feature.properties.weight*2,
+ fillColor: fill_color,
color: "#000",
- weight: 1,
+ weight: feature.properties.weight/2,
opacity: 1,
fillOpacity: 0.8
};