I'm labelling markers in a vector layer.
TextOptions of a ol.style.Text object include arrording to the docs (http://ol3js.org/en/v3.0.0-beta.1/apidoc/ol.style.html#TextOptions) no option to change font-weight.
In ol2 I used:
fontWeight: "bold"
This doesn't seem to work in ol3.
How can this be done?
I found a solution by looking at the example here: https://openlayers.org/en/master/examples/vector-labels.html:
font = weight + ' ' + size + ' ' + font
for instance:
font: 'bold 11px Arial, Verdana, Helvetica, sans-serif'
I don't think there is an explanation in the official docs yet - it only says:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With