Set style from features of layer to hidden?

المشرف العام

Administrator
طاقم الإدارة
Is it possible to set the style to hidden of certain parts of a layer of the map? The API documentation does not seems to have any property for it?

I tried to add the following:

var locatusObject = new ol.layer.Vector ({ source: locatusSource, maxResolution: 14, style: styleFunction }); function styleFunction(feature,resolution) { style = [new ol.style.Style({ stroke: changeStrokeStyle(), fill: changeFillStyle(), //opacity:0, //visible:none //visibility:hidden })]; return style; } None seem to work?



أكثر...
 
أعلى