Thanks to both of you for the suggestions. It turned out that simply separating the TYPE:COMPANY features to their own layer, and applying a cluster strategy on it was the easiest solution.<br><br>I had originally put all features on the same vector layer so that they could all be selected at the same time. By upgrading to OpenLayers 2.8, i was able to separate the layers, while passing an array of all layers to my select feature control.<br>

<br>Thanks again!<br>Matt<br><br><div class="gmail_quote">On Mon, Jun 1, 2009 at 4:17 PM, Eric Lemoine <span dir="ltr">&lt;<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thursday, May 28, 2009, Matt Kenny &lt;<a href="mailto:matthewkenny@gmail.com">matthewkenny@gmail.com</a>&gt; wrote:<br>


&gt; Hello,<br>
&gt;<br>
&gt; I&#39;ve got a quick question that I&#39;m hoping someone knows the answer to.<br>
&gt;<br>
&gt; I&#39;ve got a single vector layer containing both point and line features.<br>
&gt;<br>
&gt; All features have a &#39;TYPE&#39; attribute. Points are either &#39;TYPE:COMPANY&#39; or &#39;TYPE:AIRPORT&#39;, and lines are always &#39;TYPE:ROUTE&#39;.<br>
&gt;<br>
&gt; I&#39;m wondering if it is possible to create a cluster strategy that only clusters features in my vector layer that are of an attribute, &#39;TYPE:COMPANY&#39;?<br>
<br>
</div>Registering a beforefeaturesadded listener and have this listener<br>
filter out features that aren&#39;t of type TYPE:COMPANY should work. The<br>
listener would look like:<br>
<br>
function filter(evt) {<br>
    var features = [];<br>
    for(var i=0, len=evt.features.length; i&lt;len; i++) {<br>
        if(evt.features[i].attributes.type == &quot;TYPE:COMPANY&quot;) {<br>
            features.push(evt.features[i]);<br>
        }<br>
    }<br>
    evt.features = features; // with that the cluster strategy will<br>
see a different set of features<br>
}<br>
<br>
The thing is you need to register the listener *before* the cluster<br>
strategy is activated. For that either (a) set autoActivate to false<br>
in the strategy config, and activate the strategy yourself after the<br>
registration of your beforefeaturesadded listener, (b) deactivate the<br>
strategy, register your listener, and activate the strategy again. (a)<br>
is more elegant I think.<br>
<br>
Cheers,<br>
<div class="im"><br>
<br>
<br>
<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Matt<br>
&gt; --<br>
&gt; m a t t h e w k e n n y<br>
&gt; <a href="http://www.mkgeomatics.com" target="_blank">http://www.mkgeomatics.com</a><br>
&gt; Sent from Tempe, AZ, United States<br>
&gt;<br>
<br>
</div>--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div><br><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 Santa Paula, CA, United States