Sunday, 27 November 2016

How to show vector features in OpenLayers after hiding it?


I did change some vector features style (through check-boxes) using style property :



var features = layer.features;

for( var i = 0; i < features.length; i++ ) {
//features[i].style = { visibility: 'hidden' };
features[i].style = 'none';
}

layer.redraw();

But now if I check the box again, it supposed to display again but nothing happens! I tried:



     features[i].style = 'block'; 
OR
features[i].style = 'delete';

then redraw the layer.. but this doesn't work


Any Idea ?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...