Files
openlayers/examples/wfs-states.js
crschmidt cfa3353d42 Change the remaining examples that reference MetaCarta Labs server to
point to the newly set up TileCache service on the OSGeo projects
server.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10709 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 19:12:41 +00:00

25 lines
698 B
JavaScript

var map;
OpenLayers.ProxyHost = "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));
}