NoiseCapture icon indicating copy to clipboard operation
NoiseCapture copied to clipboard

Declare the hexagon colors in the cluster style

Open ebocher opened this issue 7 years ago • 0 comments

The color of the clustered hexagons must be managed by a css.

L.geoJSON.OnoMap = function (url) {
    return new GeoJSONCluster(null, {  wfs_url : url,     
    style: function (geoJsonFeature) {
          var count = geoJsonFeature.properties.measure_count;
          return { stroke : true,
                  interactive: false,
                  weight: 0.4,
                  color: "#ffffff",
                  bubblingMouseEvents: false,
                  fillOpacity: 0.6,
                  fillColor: count < 100 ? "rgb(220, 220, 220)" :
                  count < 1000 ? "rgb(189, 189, 189)" : "rgb(99, 99, 99)"}
      }});

ebocher avatar Aug 29 '17 08:08 ebocher