On 11/17/2010 12:45 PM, Daniel Carvalho wrote: > >>> >>> Anyway, openlayers does not ANY request to the mapserver, which is >>> strange... >> >> If your script and your wms are on the same host, try "/cgi-bin/mapserv" as >> WFS url instead of "http://localhost/cgi-bin/mapserv". >> > >
I think I identified the problem... Look at this example: http://openlayers.org/dev/examples/wfs-states.html It creates a WMS layer with the map of the world, and then a WFS layer of the United States. I found that if I comment the first part, the WFS layer never shows, and openlayers never makes a request... It is the same problem I have here! But why? var map; OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; function init() { map = new OpenLayers.Map("map"); /* var base = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://tilecache.osgeo.org/wms-c/Basic.py", {layers: "basic"} ); map.addLayer(base); */ var wfs = new OpenLayers.Layer.Vector("States", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://demo.opengeo.org/geoserver/wfs", featureType: "states", featureNS: "http://www.openplans.org/topp" }) }); map.addLayer(wfs); map.zoomToExtent(new OpenLayers.Bounds(-140.4, 25.1, -44.4, 50.5)); }
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
