Hello Everyone,<br><br>I have a question about the destroyFeatures function of the Vector Layer class that I was hoping someone could help me answer. I&#39;m currently working on the following example: <a href="http://mkgeomatics.com/apps/ajax_dev/Deliverable/checkbox_form_logged_in.html">http://mkgeomatics.com/apps/ajax_dev/Deliverable/checkbox_form_logged_in.html</a> and am trying to selectively destroy vector features based a unique attribute. For example, I have three types of features contained within a single vector layer: airports, routes, and companies. Airports and routes will be dynamically displayed based on data returned from the server, but the user will have not have the ability to selectively turn them on or off. Companies on the other hand, can be selected based on their unique company type ID. I&#39;ve created an array that is designed to be populated with features that do not match a COMPANY_ID of &#39;airport&#39; or &#39;emptyLeg&#39; (routes), which should hold all of the companies currently in the vector layer. These features are destroyed and the new companies which a user has selected are displayed on the map.<br>

<br>Currently however, the routes / airports / and companies are all being destroyed, followed by the correct companies being displayed.<br><br>I&#39;d appreciate any help regarding this. I&#39;m wondering if I&#39;m using this function properly!<br>

<br>A live example can be viewed here: <br><a href="http://mkgeomatics.com/apps/ajax_dev/Deliverable/checkbox_form_logged_in.html">http://mkgeomatics.com/apps/ajax_dev/Deliverable/checkbox_form_logged_in.html</a><br><br>
The function in question can be viewed here (line 156 function AddCompanies()): <br>
<a href="http://mkgeomatics.com/apps/ajax_dev/Deliverable/gis/scripts/mapCode_logged_in.js">http://mkgeomatics.com/apps/ajax_dev/Deliverable/gis/scripts/mapCode_logged_in.js</a><br><br>Thanks for any advice or suggestions.<br>

<br>Take care,<br>Matt<br clear="all"><br>-- <br>m a t t h e w k e n n y<br><a href="http://www.mkgeomatics.com">http://www.mkgeomatics.com</a><br>Sent from Tempe, AZ, United States