openlayers 3 - How to get a label bold in open layers 3? -


i'm labelling markers in vector layer.

textoptions of ol.style.text object include arrording docs (http://ol3js.org/en/v3.0.0-beta.1/apidoc/ol.style.html#textoptions) no option change font-weight.

in ol2 used:

fontweight: "bold" 

this doesn't seem work in ol3.

how can done?

i found solution looking @ 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 explanation in official docs yet - says:

  • type: string
  • description: font

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -