I'm using OpenLayers – 2.11,GeoServer 2.13, ExtJS 3.4, and Java for developing GIS based web applications.
I have added some point features in one vector layer.
It has id, name, address, etc.
Can I filter some points with 'name' from that vector layer and only show matched features in vector layer?
I have to filter some points and later I have to show all hidden data.
eg:
Best Answer
Since you already setup the stylemaps for diplaying labels. You can easily do this by checking the feature attribute value of the required field with the search text
Try the below code to search in attributes
Update: hide/show using renderIntent
The second method becomes faster as
renderIntent="delete"
will set the css propertydisplay: none;
(hiding) andrenderIntent="default"
will use the default rendering from your stylemap obivously showing the features.