Use ol.style.Stroke and ol.style.Fill instances in vector-layer example

This commit is contained in:
Frederic Junod
2013-11-21 18:05:18 +01:00
parent c0ad472984
commit ed211d5631

View File

@@ -86,13 +86,13 @@ map.on('postcompose', function(evt) {
if (highlight) { if (highlight) {
var render = evt.getRender(); var render = evt.getRender();
render.drawFeature(highlight, { render.drawFeature(highlight, {
stroke: { stroke: new ol.style.Stroke({
color: '#f00', color: '#f00',
width: 1 width: 1
}, }),
fill: { fill: new ol.style.Fill({
color: 'rgba(255,0,0,0.1)' color: 'rgba(255,0,0,0.1)'
} })
}); });
} }
}); });