Silly patch, doubling up my example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -98,72 +98,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script src='http://maps.google.com/maps?file=api&v=2.82&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
|
||||
<script type="text/javascript">
|
||||
var map, layer;
|
||||
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map', {
|
||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
||||
displayProjection: new OpenLayers.Projection("EPSG:4326"),
|
||||
units: "m",
|
||||
maxResolution: 156543.0339,
|
||||
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
|
||||
20037508.34, 20037508.34)
|
||||
});
|
||||
layer = new OpenLayers.Layer.Google( "G",
|
||||
{sphericalMercator: true} );
|
||||
map.addLayer(layer);
|
||||
layer = new OpenLayers.Layer.WFS( "States",
|
||||
"http://geo.openplans.org:8080/geoserver/ows", {typename: 'topp:states'},
|
||||
{
|
||||
typename: 'states',
|
||||
featureNS: 'http://www.openplans.org/topp',
|
||||
projection: new OpenLayers.Projection("EPSG:4326"),
|
||||
extractAttributes: false,
|
||||
ratio: 1.2
|
||||
} );
|
||||
map.addLayer(layer);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
|
||||
map.zoomToExtent(new OpenLayers.Bounds(
|
||||
-73.839111,40.287907,-68.214111,44.441624).
|
||||
transform(map.displayProjection, map.getProjectionObject()));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
|
||||
<h1 id="title">WFS Reprojection Example</h1>
|
||||
|
||||
<div id="tags">
|
||||
</div>
|
||||
<p id="shortdesc">
|
||||
Shows the use of the WFS layer reprojection support
|
||||
</p>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<div id="docs">
|
||||
This example shows automatic WFS reprojection, displaying an 'unprojected' WFS layer projected on the client side over Google Maps. The key configuration here is the 'projection' option on the WFS layer.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user