Updated sketch style
This commit is contained in:
@@ -35,6 +35,10 @@ var vector = new ol.layer.Vector({
|
|||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
}),
|
}),
|
||||||
|
new ol.style.Stroke({
|
||||||
|
color: 'white',
|
||||||
|
width: 5
|
||||||
|
}),
|
||||||
new ol.style.Stroke({
|
new ol.style.Stroke({
|
||||||
color: '#0099ff',
|
color: '#0099ff',
|
||||||
width: 3
|
width: 3
|
||||||
@@ -43,26 +47,17 @@ var vector = new ol.layer.Vector({
|
|||||||
}),
|
}),
|
||||||
new ol.style.Rule({
|
new ol.style.Rule({
|
||||||
filter: 'renderIntent("temporary")',
|
filter: 'renderIntent("temporary")',
|
||||||
symbolizers: [
|
|
||||||
new ol.style.Shape({
|
|
||||||
fill: new ol.style.Fill({
|
|
||||||
color: '#0033ff',
|
|
||||||
opacity: 1
|
|
||||||
}),
|
|
||||||
size: 16,
|
|
||||||
zIndex: 1
|
|
||||||
})
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
new ol.style.Rule({
|
|
||||||
filter: 'renderIntent("future")',
|
|
||||||
symbolizers: [
|
symbolizers: [
|
||||||
new ol.style.Shape({
|
new ol.style.Shape({
|
||||||
fill: new ol.style.Fill({
|
fill: new ol.style.Fill({
|
||||||
color: '#0099ff',
|
color: '#0099ff',
|
||||||
opacity: 1
|
opacity: 1
|
||||||
}),
|
}),
|
||||||
size: 16,
|
stroke: new ol.style.Stroke({
|
||||||
|
color: 'white',
|
||||||
|
opacity: 0.75
|
||||||
|
}),
|
||||||
|
size: 14,
|
||||||
zIndex: 1
|
zIndex: 1
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
@@ -74,10 +69,10 @@ var vector = new ol.layer.Vector({
|
|||||||
color: '#0033ff',
|
color: '#0033ff',
|
||||||
opacity: 1
|
opacity: 1
|
||||||
}),
|
}),
|
||||||
size: 16
|
size: 14
|
||||||
}),
|
}),
|
||||||
new ol.style.Fill({
|
new ol.style.Fill({
|
||||||
color: '#ffffff',
|
color: 'white',
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
}),
|
}),
|
||||||
new ol.style.Stroke({
|
new ol.style.Stroke({
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {
|
|||||||
var sketchPoint = new ol.Feature({
|
var sketchPoint = new ol.Feature({
|
||||||
geom: new ol.geom.Point(start.slice())
|
geom: new ol.geom.Point(start.slice())
|
||||||
});
|
});
|
||||||
sketchPoint.setRenderIntent(ol.layer.VectorLayerRenderIntent.FUTURE);
|
sketchPoint.setRenderIntent(ol.layer.VectorLayerRenderIntent.TEMPORARY);
|
||||||
this.sketchPoint_ = sketchPoint;
|
this.sketchPoint_ = sketchPoint;
|
||||||
features.push(sketchPoint);
|
features.push(sketchPoint);
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ goog.provide('ol.layer.VectorLayerRenderIntent');
|
|||||||
ol.layer.VectorLayerRenderIntent = {
|
ol.layer.VectorLayerRenderIntent = {
|
||||||
DEFAULT: 'default',
|
DEFAULT: 'default',
|
||||||
HIDDEN: 'hidden',
|
HIDDEN: 'hidden',
|
||||||
SELECTED: 'selected'
|
SELECTED: 'selected',
|
||||||
|
TEMPORARY: 'temporary'
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user