0

What controls whether or not a feature label will display? I would like to force the feature labels to display regardless of zoom level and relative distance to another feature. There is some magic happening behind the scenes that makes the labels disappear as zoom level decreases (panning out). Is there a way to override this?

https://openlayers.org/en/latest/examples/vector-labels.html

I thought the declutter option could be set to false, but that didn't do it either:

https://openlayers.org/en/latest/examples/vector-label-decluttering.html

Jonathan
  • 894
  • 2
  • 9
  • 20
  • 3
    set `overflow` in the text style https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html It was called exceedLength before version 4.6 (it's still confusingly called that in the example you linked) – Mike Mar 01 '19 at 20:40

1 Answers1

1

Mike found the answer. In ol.style.Text, set the option (overflow:true).

Jonathan
  • 894
  • 2
  • 9
  • 20