<div dir="ltr">I've tested my WFS with<div><a href="http://192.168.1.95/cgi-bin/mapserv.exe?MAP=C:/myprojects/mun.map&LAYERS=Municipality&MODE=MAP">http://192.168.1.95/cgi-bin/mapserv.exe?MAP=C:/myprojects/mun.map&LAYERS=Municipality&MODE=MAP</a><br>
</div><div><br></div><div>and all is fine i can see my data. And i see the states one time.</div><div><br></div><div>when i try to add it in Open Layers with:</div><div><br></div><div><div> <script type="text/javascript"></div>
<div> var map, layer, select, hover, control;</div><div><br></div><div> function init(){</div><div> OpenLayers.ProxyHost= "proxy.cgi?url=";</div><div> map = new OpenLayers.Map('map', {</div>
<div> controls: [</div><div> new OpenLayers.Control.PanZoom(),</div><div> new OpenLayers.Control.Permalink(),</div><div> new OpenLayers.Control.Navigation()</div>
<div> ]</div><div> });</div><div> layer = new OpenLayers.Layer.WMS(</div><div> "States WMS/WFS",</div><div> "<a href="http://192.168.1.95/cgi-bin/mapserv.exe?MAP=C:/myprojects/mun.map&LAYERS=Municipality&MODE=MAP">http://192.168.1.95/cgi-bin/mapserv.exe?MAP=C:/myprojects/mun.map&LAYERS=Municipality&MODE=MAP</a>",</div>
<div> {layers: 'Municipality:MN_NAME', format: 'image/gif'}</div><div> );</div><div> select = new OpenLayers.Layer.Vector("Selection", {styleMap: </div><div> new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])</div>
<div> });</div><div> hover = new OpenLayers.Layer.Vector("Hover");</div><div> map.addLayers([layer, hover, select]);</div><div> </div><div> control = new OpenLayers.Control.GetFeature({</div>
<div> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),</div><div> box: true,</div><div> hover: true,</div><div> multipleKey: "shiftKey",</div><div>
toggleKey: "ctrlKey"</div><div> });</div><div> control.events.register("featureselected", this, function(e) {</div><div> select.addFeatures([e.feature]);</div>
<div> });</div><div> control.events.register("featureunselected", this, function(e) {</div><div> select.removeFeatures([e.feature]);</div><div> });</div><div> control.events.register("hoverfeature", this, function(e) {</div>
<div> hover.addFeatures([e.feature]);</div><div> });</div><div> control.events.register("outfeature", this, function(e) {</div><div> hover.removeFeatures([e.feature]);</div>
<div> });</div><div> map.addControl(control);</div><div> control.activate();</div><div><br></div><div> // map.setCenter(new OpenLayers.Bounds(-140.444336,25.115234,-44.438477,50.580078).getCenterLonLat(), 3);</div>
<div> }</div><div> </script></div></div><div><br></div><div>i see the states many time and not only one time! And i cannot "Query" datas Why? </div><div><br></div><div><br></div></div>