如何在olx.style.TextOptions文本中添加新行?
问题描述:
我必须创建2行标签. 在OL 2中,我通过在文本标签中添加'\ n'来做到这一点,但是ol3似乎不支持它:
I have to create label with 2 rows. in OL 2 I've did it by adding '\n' in the text label but it seems that ol3 doesn't support it:
new ol.style.Style({
text : new ol.style.Text(/** @type {olx.style.TextOptions} */ ({
text:'line 1 \n line 2'
}))
})
我该如何在1& 2个?
How can I break the line between 1 & 2 ?