0

We are developing a project which contains a lot of data. We are using WMS layers for displaying the points. Also we used WMS to return points information in a popup window,
however to highlight selected point we used WFS layer.

The problem now is that sometimes the popup displayed without highlighting the selected point and vice versa.

How could I combine between these two features (highlight selected point and show the popup for it)?

Notes:

I think one reason is the clicking event defined different WFS using:

selectControl.events.register("featureselected", this, function(e) {  
    select.addFeatures([e.feature]);
}

and WMS using:

popupwindow1=new OpenLayers.Control.WMSGetFeatureInfo(
{  
    layers: [layer1],  
    autoActivate: true,  
    maxFeatures: 3,  
    infoFormat: "application/vnd.ogc.gml",  
    eventListeners: { /* .... */ } 
} 

My second question now is: how could I return features from WFS layer without adding the vector layer to the map?

Carsten
  • 11,287
  • 7
  • 39
  • 62
Reem
  • 63
  • 6
  • only ask one question in each post – Rune FS Mar 09 '13 at 11:55
  • 1
    Assuming that both layers are conveying the same information, wouldn't it be easier to attach your processing to one single layer? The WFS layer for instance.That way you'll have your events generated and applied by one single source, which is easier to handle than having to poll and sync events from 2 layers. – b2Wc0EKKOvLPn Mar 17 '13 at 16:30
  • thanks ylabidi, that's what i did and it works :) – Reem Mar 20 '13 at 09:29

0 Answers0