2

I'm looking to create a heatmap using OpenLayers, which is possible using the ol.layer.Heatmap class. However, I want to limit the visualisation of the heatmap effect to span just the underlying vector polygons (so not a true heatmap).

So in the end the heatmap should only visible as overlay on existing vector features. The reason I want to do this is that I want to give the polygons a weighted gradient, which depends on the weight of the individual vertices of the polygon. There will only be one polygon at a time (in a pop-up), so the heatmap effect will be isolated automatically to just one polygon, it just needs to be clipped. Does anyone know if this can be realized in OpenLayers?

lambertj
  • 3,037
  • 3
  • 18
  • 37
Rob Braggaar
  • 95
  • 1
  • 2
  • 7
  • 1
    Hey, did you find the solution ??? – Neha Sharma Nov 05 '19 at 13:42
  • You can limit the heatmap by adding a masking layer on top of the heatmap. That will at least visually clip the layer. As for the other part of my question, for adding extra weight to certain areas you can add extra vertices at certain spots. – Rob Braggaar Nov 07 '19 at 11:40
  • How did you accomplish this task of adding extra vertices can you please elaborate ? I want to extract boundary in the form of WKT. – Neha Sharma Nov 11 '19 at 12:41

0 Answers0