Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The case: A lot of features need to be rendered on an openlayers map. Drawing all features on the map (WFS) causes performance issues (especially in IE). Therefore I have chosen to use WMS so that the client is spared the heavy rendering load.

The problem: To get information about certain features I use "Openlayers.Control.GetFeature". This works, but only when you use one layer.

I have multiple layers with different feature types. I still need to be able to use the box selection method. It may be that this exceeds the openlayers limits.

Adding multiple select controls did not seem to have any effect.

share|improve this question
2  
why not use getFeatureInfo - you can specify as many layers as you need. –  iant Oct 31 '11 at 14:24
    
@iant That is a possibility indeed, but how would I setup a box selection? Using spatial filter with 4 coordinates? –  Boedy Oct 31 '11 at 14:31
3  
depends on your WMS server - with GeoServer you can append a filter element to the request docs.geoserver.org/latest/en/user/services/wms/vendor.html –  iant Oct 31 '11 at 14:43
    
@iant Thanks! That link helped me so much! I'm thinking of writing my own functions to get the data. This way I can adjust it to my needs. I'll try and update this thread when I figured out the most of it. –  Boedy Oct 31 '11 at 16:16
    
see gis.stackexchange.com/questions/15616/… for why writing your own function is a bad idea. –  iant Nov 1 '11 at 11:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.