[OpenLayers-Users] Alternatives to get rid of WFS layers

Roel De Nijs roel.denijs at aquafin.be
Thu Jan 15 17:33:25 PST 2015


> What I dont follow is why, if it would be easy to select them on the
> map, could you not select them with WFS? The powerful feature of WFS is
> that you can do spatial and feature-based queries on the server.

You are absolutely correct! My interpretation of "easy" is based on our current user experience. In the current version all WFS data is loaded, so the user can select features very easily by just selecting them using a SelectFeature control (and can select multiple features by pressing the shift-button). So that's what I considered to be "easy", because to select 5 features the user has to click 5 times (holding down the shift button).
The scenario you describe is exactly what we will implement in the new version of our application: getting rid of all our WFS layers and do a WFS request to know which features are located on a given click point. And if the user wants to select the same 5 features, it will require (in the worst scenario) 10 clicks: 1 to execute the spatial select in WFS and a 2nd one to select the feature of his choice, as the WFS request could return more than 1 feature at that location). But this approach is definitely an improvement if you need to select 2-3 features which are located at the same point for example. With the WFS layer you could only select the feature of the top layer.

When a user wants to select a feature, he has to click on the map to fetch the features on the click point. Then he gets a popup showing some details about these features and he can select 1 or more of them. Currently I use a GetFeature control with a custom defined protocol to execute the WFS request and process the results. Is this the best control for this scenario? Or would a SelectFeature control (or another one) be more suitable for this job?

Kind regards,
Roel

________________________________________
Van: openlayers-users-bounces at lists.osgeo.org [openlayers-users-bounces at lists.osgeo.org] namens Phil Scadden [p.scadden at gns.cri.nz]
Verzonden: maandag 12 januari 2015 1:24
Aan: openlayers-users at lists.osgeo.org
Onderwerp: Re: [OpenLayers-Users] Alternatives to get rid of WFS layers

 >And then it could be very hardand time-consuming to select just the
4-5 features you are interested in. It is much easier to select them >on
the map itself.

What I dont follow is why, if it would be easy to select them on the
map, could you not select them with WFS? The powerful feature of WFS is
that you can do spatial and feature-based queries on the server. If you
click on the map to select a feature you can see there (drawn with WMS),
then you do a spatial select in WFS to fetch only features that
intersect the click point. You only run into major problem if a single
click on the map could have a very large no. of features (or very big
geometries). In this case, then yes, WFS to return the FeatureID (and
enough other info for users to decide which were the ones they wanted),
into checkbox list would work. However, if you are selecting only
features intersecting the point where user clicks, then it should be a
small no. of features. If it returned an excessive count, you could
detect that. Then issue message say "too many features, please zoom in
and try again".



Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
[Congres publieke ruimte]<http://www.congrespubliekeruimte.be>
________________________________

Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | Twitter<https://twitter.com/aquafinnv> | YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | LinkedIN<http://www.linkedin.com/company/aquafin/products>

Disclaimer: zie www.aquafin.be<http://www.aquafin.be>   P Denk aan het milieu. Druk deze mail niet onnodig af.


More information about the Users mailing list