Skip to main content
2 of 2
spelling and format
nmtoken
  • 13.6k
  • 5
  • 38
  • 89

What is the dimension used in OpenLayers stroke width?

In OpenLayers, when you are giving a style to layer, say a WFS layer, we can give stroke width, like this:

var layerWFS = new ol.layer.Vector({
    source: sourceWFS,
    title: 'plot_layer',
    name: 'plot_layer',
    style: new ol.style.Style({
        stroke: new ol.style.Stroke({
            color: 'rgba(255, 0, 255, 1)',
            width: 1
        })
    })
});

Here width is 1 , I would like to know in which dimension that we are giving the stroke width, whether:

  1. millimeter (mm) 1 means 1mm
  2. centimeter (cm) 1 means 1cm
AhammadaliPK
  • 450
  • 1
  • 5
  • 23