如何在JavaScript中使用Openlayer 4.6.5为多行文本添加文本框?

时间:2018-12-17 23:04:07

标签: javascript openlayers-3

new style.Style({
        image: "./fight.icon",
        text: new style.Text({
            text: "name:2\nlabel:G\nvalue:22",
            fill: style.Fill({
                color: '#000'
            }),
            offsetX: 15,
            stroke: new style.Stroke({ color: 'white', width: 2 }),
            textAlign: 'left'
        })
    });

我想在一个多行文本框中输入名称:2,标签:G和值:22,名称,标签和值以粗体显示。但使用上面的代码,它将名称:2,标签:G,值:22放在单独的文本框中。

0 个答案:

没有答案