On Wednesday, July 8, 2009, Paul Spencer <[email protected]> wrote:
> Eric,
>
> On 8-Jul-09, at 9:25 AM, Eric Lemoine wrote:
>
>
> On Wednesday, July 8, 2009, Matthew Doyle <[email protected]> wrote:
>
>
> Hello all,
>
> Sorry for resurrecting this topic, but i am having trouble getting my
> features to "remember" which StylemMap they have been changed to, using the
> renderIntent.
>
> After following Heidtmare's suggestions below, my WFS layer is now showing
> and hiding features on the fly using the renderIntent and then calling
> drawFeature, as follows:
>
> for(var i = 0; i < WFSLayer.features.length; i++) {
>   WFSLayer.features[i].renderIntent = "hidden";
>   WFSLayer.drawFeature(WFSLayer.features[i]);
> }
>
> This works great, right up until i zoom the map or move to a different
> extent. Each feature goes back to their "default" renderIntent and the
> features are shown once again.
>
> How can i force a permanent change for each feature so that when the user
> zooms it remembers what changes have just been made?
>
>
> Hi
>
> You can use the "style" property. E.g.
>
> feature.style = OpenLayers.Feature.Vector.style["delete"];
>
>
>
> why does the renderIntent approach not work?  It does work for controls like 
> SelectFeature.  From what I see in the code, the renderIntent of the feature 
> is changed in createSymbolizer called from drawFeature, which should use the 
> renderIntent of the feature (in this case, 'hidden').  Unless the style map 
> doesn't contain a 'hidden' style, in which case it would default back to ... 
> um ... 'default' :)


I agree with your reasonning Paul - setting feature.renderIntent to
"delete" should work equally.


>
> Paul
>
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to