Openlayers 3 linedash画虚线

版权声明:本文为博主原创文章,未经暴烈骑士允许或未声明者不得转载。 https://blog.csdn.net/u010543785/article/details/52605944

Openlayers 3 linedash画虚线

虚线样式如下

new ol.style.Style({
        fill: new ol.style.Fill({
            color: '#0044CC'
        }),
        stroke: new ol.style.Stroke({
            //lineJoin:'bevel',
            lineDash:[1,2,3,4,5,6],
            color: '#0044CC',
            width: 4
        })
    })

linedash属性值类型是Array,随意改改可看到不同的虚线效果

效果图

图

猜你喜欢

转载自blog.csdn.net/u010543785/article/details/52605944
今日推荐