i got a line (via wfs) over a polygon (via wms). when a user clicks on
the line, i want just the wfs to return. when the user clicks on the
polygon, i want just the wms to return. right now, when a user clicks
on the line, both return.

the two functions:
1. function fwfs(feature){      ... }
2. function fwms(evt){ ... }

the two triggers:
1. ...callbacks: { 'click' : fwfs }...
2. ...query[i].events.register('getfeatureinfo', this, fwms);...

Problematic. One way is to have the concept of an active layer so that only that layer gets the query. (which is what I do - especially for hover events). Even if you use the method of aborting the WMS call or swallowing the response, what happens if the WMS post returns first despite clicking on the line? I guess with your design, the line data is all in local memory? Another approach would be to chain the events - fire the WMS if the WFS returns empty response.


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
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to