[OpenLayers-Dev] How to highlight a selected features by using a FIPS

Zhanping Shi zhanpings at yahoo.com
Wed Jan 12 07:47:23 EST 2011


Hi Folks,

I am struggling a select features by using its attributes ( no click on the 
features directly and just click on a dropdown list). the code snip is as below, 
but it would not work, can you any guys provide a idea?

It seems the function doesn't work as below,

var selectedFeatures = 
OpenLayers.Layer.Vector.getFeaturesByAttribute("attributeName", 
"attributeValue");


Thank you for your great attention!

Zhanping




________________________________
From: Andreas Hocevar <ahocevar at opengeo.org>
To: Eric Lemoine <eric.lemoine at camptocamp.com>
Cc: openlayers-dev at lists.osgeo.org
Sent: Wed, January 12, 2011 7:22:50 AM
Subject: Re: [OpenLayers-Dev] "allow pan while drawing" patch

Hi Eric,

thanks for your efforts. My only concern is that adding vertices on mouseup 
instead of mousedown negatively affects the user experience when a Snapping 
control is used. This is because the user doesn't see any more where the vertex 
is going to be snapped to.

At this point, I have no idea how to solve this.

Andreas.

On Jan 12, 2011, at 13:05 , Eric Lemoine wrote:

> Hello
> 
> Currently the map cannot be panned when a draw feature control is
> active. Google Maps allows it, and I think it would be great that
> OpenLayers allow it as well.
> 
> I've started prototyping this in a sandbox. It currently it works for
> "draw point" and "draw line" only (and it breaks the freehand mode).
> See [1] and [2] for examples.
> 
> With my patch points are added on mouseup as opposed to mousedown, so
> the drawing user experience is changed a bit. Also, although my patch
> makes this somehow configurable (through stopDown stopUp options), I
> think "allow pan while drawing" should be the default.
> 
> What do you think about it? Would such a patch make sense for
> inclusion into the trunk?
> 
> Thanks for any feedback,
> 
> 
> [1] 
><http://dev.openlayers.org/sandbox/elemoine/draw-feature/examples/draw-feature.html>
>
> [2] 
><http://dev.openlayers.org/sandbox/elemoine/draw-feature/examples/measure.html>
> 
> -- 
> Eric Lemoine
> 
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> 
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Dev mailing list
Dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110112/4bb95142/attachment.html


More information about the Dev mailing list