OpenLayers 3:如何change/set矢量图的样式

OpenLayers 3: How to change/set the style of vector map

我正在尝试从室内矢量图中删除所有线条。我不确定如何使用样式来做到这一点。有人可以指导我吗?

这是我如何设置地图的代码:

var vector = new ol.layer.Vector({
    source: new ol.source.Vector({
        url: MAPS_URL + 'map.kml',
        format: new ol.format.KML()
    })
});

var map = new ol.Map({
  layers: [vector],  
  target: 'floormap',
  interactions: ol.interaction.defaults({mouseWheelZoom:false}),
  view: new ol.View({
      center: [0, 0],          
      zoom: 15,
      minZoom: 15,
      maxZoom: 18
    })    
}); 

我是否必须使用 foreachfeature 方法循环遍历要素并单独设置样式,或者有没有办法在地图上设置全局样式?我认为矢量在定义 none 时采用默认样式,如何创建没有描边或填充的样式,然后将其设置为矢量图的样式?

谢谢

这是解决方案,从 Jonatas 提供的link

var stroke = new ol.style.Stroke({
    color: 'rgba(255, 204, 0, 0)',
    width: 0,
});

var style = new ol.style.Style({
    stroke: stroke
});


vector = new ol.layer.Vector({
    source: new ol.source.Vector({
        url: MAPS_URL + maps[map_id],
        format: new ol.format.KML({
            extractStyles: false
        })
    }),
    style: style
});        

map.addLayer(vector);