Use ol.style.Style in rtree example
This commit is contained in:
+4
-4
@@ -67,15 +67,15 @@ var style = new ol.style.Style({
|
|||||||
var colors = ['red', 'orange', 'yellow', 'blue', 'green', 'indigo', 'violet'];
|
var colors = ['red', 'orange', 'yellow', 'blue', 'green', 'indigo', 'violet'];
|
||||||
var depthStyle = [];
|
var depthStyle = [];
|
||||||
for (i = 0, ii = colors.length; i < ii; ++i) {
|
for (i = 0, ii = colors.length; i < ii; ++i) {
|
||||||
depthStyle[i] = {
|
depthStyle[i] = new ol.style.Style({
|
||||||
fill: null,
|
fill: null,
|
||||||
image: null,
|
image: null,
|
||||||
stroke: {
|
stroke: new ol.style.Stroke({
|
||||||
color: colors[i],
|
color: colors[i],
|
||||||
width: (7 - i) / 2
|
width: (7 - i) / 2
|
||||||
},
|
}),
|
||||||
zIndex: i
|
zIndex: i
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
var extentsByDepth = vectorSource.rTree_.getExtentsByDepth();
|
var extentsByDepth = vectorSource.rTree_.getExtentsByDepth();
|
||||||
var rtreeExtentFeatures = [];
|
var rtreeExtentFeatures = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user