0
如果設置樣式,功能不顯示的OpenLayers 4套風格明確特徵
new ol.layer.Vector({
source: vectorSource1,
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'red'
})
})
})
如果明確造型
new ol.layer.Vector({
source: vectorSource1
})
所有顯示OK
var featurething = new ol.Feature({
});
featurething.setGeometry(new ol.geom.Point(ol.proj.fromLonLat([29, 29])));
//console.log(value);
vectorSource1.addFeature(featurething);
THX,所有正常工作 – Vic