[OpenLayers-Users] new state for features - 'viewed'

Michael Ryan mr at mry4n.net
Thu Aug 8 15:15:39 PDT 2013


Have you tried calling layer.drawFeature(your_feature) after changing the style?

-Mike 


On Aug 8, 2013, at 5:32 PM, Brian Busch <bdbuschg at gmail.com> wrote:

I've been trying to write code to support adding a third state to a feature. We already have 'default' and 'selected'. I'd like to have one that once the user has selected the feature (or was done programmatically), I'd like to style it so they know they've viewed it.

A good example of why: load into Google Earth a layer that has 100s of features in the same spot, GE will display a "start burst" with your 100s of push pins, you click on one of them and see the popup. You go back to the same spot, and click, get the same star burst; you have no idea which one you just looked at.

In our app, we want the same feature...I've tried to change the feature style after selection (to a different externalGraphic) but can't seem to make the magic work.

Anyone implemented this before? I've googled this to no end!

Thanks,

BDB
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list