What is the "ol.style.Style array"?
The ol.layer.Vector style can be set as ol.style.Style
a style function or an array ol.style.Style
. What is an array and what does it do - compared to just passing an object ol.style.Style
?
I cannot find any information about this, neither in the official API docs nor in the tutorials .
source to share
If you look at the example of drawing lines, when you draw lines, they appear in blue with a white frame / outline.
This is accomplished by constructing a double line, first with a large white line, then with a thin blue line.
There are 2 styles for the same geometry. This cannot be done with one ol.style.Style
, so you need to pass an array of two styles in order to do this : see the source for that .
source to share