how can I change the stroke color and fill color of the text encircled in the attached picture?

25 Views Asked by At

I am working on an old code and new to open layers. The map is created using open layers. I have no clue how can I change the appearance of the Text that say "Actual Fault Location". Right now the the text has black outline and pink fill color. How can I change that and if the color is picked by the user.

What I have Tried: I tried the following code but it did not pick up the style;

` var myStyle = new ol.style.Style({
   fill: new ol.style.Fill({
    color: 'rgba(255, 153, 0, 0.4)'
    }),
                    stroke: new ol.style.Stroke({
                        color: 'rgba(255, 204, 0, 0.2)', //'#3399CC',
                        width: 2.5
                    })
                });

                var tesVector = new ol.source.Vector({
                    features: features,
                    style: myStyle
                });`
0

There are 0 best solutions below