Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html5 canvas Openlayers html5画布文本粗体一个字_Html5 Canvas_Openlayers - Fatal编程技术网

Html5 canvas Openlayers html5画布文本粗体一个字

Html5 canvas Openlayers html5画布文本粗体一个字,html5-canvas,openlayers,Html5 Canvas,Openlayers,我正在开发一个应用程序,允许用户将文本添加到地图中。我正在使用Openlayersol.style.Text来实现这一点,请参见以下内容: text: new ol.style.Text({ text: "Your text \n on a new line", textAlign: 'left', textBaseline: 'bottom', offsetX: 10, offsetY: -5, scale: 1.5, placement: 'point', f

我正在开发一个应用程序,允许用户将文本添加到地图中。我正在使用Openlayers
ol.style.Text
来实现这一点,请参见以下内容:

text: new ol.style.Text({
  text: "Your text \n on a new line",
  textAlign: 'left',
  textBaseline: 'bottom',
  offsetX: 10,
  offsetY: -5,
  scale: 1.5,
  placement: 'point',
  font: '12px sans-serif',
  backgroundFill: new ol.style.Fill({
    color: 'rgba(255,255,255,1)'
  }),
  backgroundStroke: new ol.style.Stroke({
    color: 'rgba(0,0,0,1)',
    width: 1
  }),
  padding: [5,5,5,5]
})
我知道我可以通过将
font:'12px sans serif'
更改为
font:'bold 12px sans serif'

我的问题是:有没有一种方法可以让一个词加粗(“行”)呢?

相关问题(在gis.stackexchange.com上):