<html>
<head>
<title>My Map</title>
<style>
#map-id {
width: 512px;
height: 256px;
}
</style>
<script src="http://www.openlayers.org/dev/OpenLayers.js"></script>
</head>
<body>
<h1>My Map</h1>
<div id="map-id"></div>
<script>
OpenLayers.ProxyHost = "http://localhost/cgi-bin/proxy.cgi?url=";
var medford = new OpenLayers.Bounds(
4284890, 253985,
4288865, 257980
);
var map = new OpenLayers.Map("map-id", {
projection: new OpenLayers.Projection("EPSG:2270"),
units: "ft",
maxExtent: medford,
restrictedExtent: medford,
maxResolution: 2.5,
numZoomLevels: 5
});
var base = new OpenLayers.Layer.WMS(
"Medford Streets & Buildings",
"http://localhost:8080/geoserver/wms",
{layers: "taxlots"}
);
map.addLayer(base);
var buildings = new OpenLayers.Layer.Vector("Buildings", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.0.0",
url: "http://localhost:8080/geoserver/wfs",
featureType: "buildings",
featureNS: "http://www.gis.edu.gr/attiki",
srsName: "EPSG:2270"
})
});
map.addLayer(buildings);
map.zoomToMaxExtent();
</script>
</body>
</html>