<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;">Hi,<br><br>I have a search function in my app which follows this method...<br><br>1. enter search string in textbox<br>2. press search button -> which executes the search action in a form<br>3. the search layer (vector) is added to the map and tree and the feature results to a gridpanel<br>4. click on dataset in grid -> the grid selectionmodel hightlights the dataset, and zooms to the selected feature extent.<br><br>The search works great the first time, but after the search is complete, I would like to remove the search layer from the map, close the gridpanel and continue using the app without the vector layer in the map. If I donīt remove the search layer, the vector layer stays on top of other layers meaning that the wms getFeatureInfo canīt be called.<br><br>if I call
map.removeLayer(searchlayer)....the layer is removed, but all <span style="font-weight: bold;">subsequent</span> searches are not highlighted from the grid selection model.<br><br>Therefore I want to remove the layer in the map and the tree and somehow reset the selection model in the grid so that future search results can be added again and hightlighted in the gridīs selection model.<br><br>If you want to test it the url is here.<br><span><a target="_blank" href="http://maps.zgb.de/www/eeg/search.html">http://maps.zgb.de/www/eeg/search.html</a></span><br><br>The code is written ( and badly commented) in the html source.<br><br><br>any help or hints would be great,<br><br>yours,<br><br>rob<br></div></body></html>