Skip to main content
deleted 2 characters in body
Source Link
Koba
  • 181
  • 1
  • 15

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddlejsfiddle

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddle

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddle

edited body
Source Link
Koba
  • 181
  • 1
  • 15

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddlejsfiddle

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddle

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddle

Source Link
Koba
  • 181
  • 1
  • 15

This is the way to do this, you can also set the stroke. Be careful, if you're trying to take the contents code from this site, remember to put the "u" character inside the string, like this: '\e059' -> '\ue059', otherwise it will not work.

var styleIcon = new ol.style.Style({
text: new ol.style.Text({
    text: '\ue059',
    font : 'normal 18px "Glyphicons Halflings"',
    stroke: new ol.style.Stroke({ color: 'black', width: 2 })
    fill: new ol.style.Fill({color: 'yellow'})
    textBaseline: 'Bottom',
    scale: 1              
})

Here is a working jsfiddle