vendredi 26 décembre 2014

Line dash not working OL3 (Openlayers 3)


I want to display a dashed line in a vector layer, as the it's shown in the Documentation there is a propriety called lineDash , but it didn't work for me here my code :



var iconStyle_line = new ol.style.Style({// My style definition
fill: new ol.style.Fill({
color: 'rgba(221, 99, 0, 0.5)'
}),
stroke: new ol.style.Stroke({
color: 'rgba(221, 99, 0, 0.5)',
width: 3,
lineDash: [4]
})
});

var vectorSource_line = new ol.source.Vector();// My vector source

var vector_line = new ol.layer.Vector({

source: vectorSource_line,
style: iconStyle_det_line
});


I appreciate your support on this, thanks in advance,





Aucun commentaire:

Enregistrer un commentaire