Hi Antonio,

OpenLayers is a Javascript framework, which loads geoserver tiles
dynamically.
best place to see examples is at the http://openlayers.org/ sample page:
http://openlayers.org/dev/examples/

<http://openlayers.org/dev/examples/>Good examples to select and highlight
features dynamically are

http://openlayers.org/dev/examples/highlight-feature.html
http://openlayers.org/dev/examples/select-feature-multilayer.html
http://openlayers.org/dev/examples/getfeature-wfs.html  --> This would be a
mix with Andreas Approach.
http://openlayers.org/dev/examples/dynamic-text-layer.html --> With popup


<http://openlayers.org/dev/examples/highlight-feature.html>Using OpenLayers
you can use the above example approach, by selecting the feature on the map
canvas, or you ca also use Andreas approach by re-requesting a WFS layer
with whatever CQL filter. Either will do the trick.

If you are going to be selecting features with mouse click events, then
loading data to OpenLayers will be your best choice.
On the other hand, if you will be querying a large number of data, best
would be to use Andreas approach.

Anyhow, Both OpenLayers and Geoserver's documentation are very good.

Hope this helps,

Ricardo

2011/4/13 Antonio Parrotta <[email protected]>

> Hi Andrea, I will look into filter as you suggested. thanks a lot
>
> Hi Ricardo,
> I'm new to both geoserver and OL, would you please give me just a direction
> or any example to face this using openlayer?
>
> thanks a lot
> - Antonio
>
>
>
> On Wed, Apr 13, 2011 at 8:58 AM, Andrea Aime <[email protected]
> > wrote:
>
>> On Tue, Apr 12, 2011 at 11:52 PM, Antonio Parrotta
>> <[email protected]> wrote:
>> > Hi, I'm new to geoserver, need to find feature/s by attributes.
>> Basically I
>> > need to query the layer searching by a set of attributes, then highlight
>> the
>> > returned feature on the map. Is it feasible?
>>
>> Add the layer twice to your map, once with the usual style, once with
>> the highlight style.
>> Then use CQL_FILTER to filter the second layer according to your
>> selection whilst
>> the first remains unfiltered, something like:
>>
>> &CQL_FILTER=INCLUDE;myAttribute>35
>>
>> Using OL + WFS as Ricardo suggested is another option. It will give
>> you more control,
>> probably nice popup functionality and visual feedback as you hover on
>> the selection,
>> but it won't scale up to large selections (e.g., more than a few tens
>> of features)
>> whilst the approach I'm suggesting above will be much more static but
>> will scale up
>> to whatever selection size with no particular problems.
>>
>> Cheers
>> Andrea
>>
>> --
>> -------------------------------------------------------
>> Ing. Andrea Aime
>> GeoSolutions S.A.S.
>> Tech lead
>>
>> Via Poggio alle Viti 1187
>> 55054  Massarosa (LU)
>> Italy
>>
>> phone: +39 0584 962313
>> fax:      +39 0584 962313
>> mob:    +39 333 8128928
>>
>> http://www.geo-solutions.it
>> http://geo-solutions.blogspot.com/
>> http://www.youtube.com/user/GeoSolutionsIT
>> http://www.linkedin.com/in/andreaaime
>> http://twitter.com/geowolf
>>
>> -------------------------------------------------------
>>
>
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to