ol-ext icon indicating copy to clipboard operation
ol-ext copied to clipboard

FlowLine - parts of the line not displayed when map is zoomed out

Open woytekm opened this issue 2 years ago • 1 comments

Hello, i have a following problem with FlowLine: when i zoom the map out - layer with FlowLine is rendered only partially.

Properly rendered data:

screen 1

Zoomed out map, only parts of the line are rendered:

screen 2

my styleFn:

 function styleFn(f) {
    return new ol.style.FlowLine({
      visible: false,
      lineCap: 'round',
      color: function(f, step){
        return getColor(f.getProperties()['shock']);
      },
      width: 3,
      geometry: function (f) {
        if (f.getGeometry().getType() === 'MultiLineString') {
          return f.getGeometry().getLineString(0);
        } else {
          return f.getGeometry();
        }
       }
      })
    }

Changing line width does not impact the problem. When i remove style from layer, data displays just fine on all zoom levels. Source is GeoJSON file with a large number of LineString features.

woytekm avatar Jun 20 '22 21:06 woytekm

Do you have a working example?

Viglino avatar Jul 06 '22 08:07 Viglino