Skip to main content
2 of 6
edited tags
nagytech
  • 3.8k
  • 19
  • 37

Dashed lines in OL3?

I know this question has been asked earlier here . But the solution proposed is not working. I was unable to comment on that due to reputation points so had to post this question.

My code is :

var calculateStyle= new ol.style.Style({
      fill: new ol.style.Fill({
    color: [255, 255, 255, 0.6],
    opacity: 0.3
  }),
  stroke: new ol.style.Stroke({
    color: [0, 153, 255, 1],
    linedash: [40,40],
    width: 3
  })
});

I tried both [4,4] and [40,40] suggested in the question linked. But it's not working.

Any help will be appreciated.

Ishan
  • 365
  • 1
  • 3
  • 12