Merge the excellent documentation work done during foss4g into trunk. Many
thanks to all the contributors who helped put this together. I'm not exactly sure of what's going to happen with this, but for now, at http://openlayers.org/dev/doc/examples.html you can see links to all the examples *with descriptions*. Hooray! git-svn-id: http://svn.openlayers.org/trunk/openlayers@5362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 100%;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
// make map available for easy debugging
|
||||
var map;
|
||||
|
||||
@@ -51,15 +51,15 @@
|
||||
var veroad = new OpenLayers.Layer.VirtualEarth(
|
||||
"Virtual Earth Raods",
|
||||
{'type': VEMapStyle.Road, 'sphericalMercator': true}
|
||||
);
|
||||
);
|
||||
var veaer = new OpenLayers.Layer.VirtualEarth(
|
||||
"Virtual Earth Aerial",
|
||||
{'type': VEMapStyle.Aerial, 'sphericalMercator': true}
|
||||
);
|
||||
);
|
||||
var vehyb = new OpenLayers.Layer.VirtualEarth(
|
||||
"Virtual Earth Hybrid",
|
||||
{'type': VEMapStyle.Hybrid, 'sphericalMercator': true}
|
||||
);
|
||||
);
|
||||
|
||||
// create Yahoo layer
|
||||
var yahoo = new OpenLayers.Layer.Yahoo(
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
// create a vector layer for drawing
|
||||
var vector = new OpenLayers.Layer.Vector("Editable Vectors");
|
||||
|
||||
|
||||
map.addLayers([gmap, gsat, ghyb, veroad, veaer, vehyb,
|
||||
yahoo, yahoosat, yahoohyb, mapnik, wms, vector]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
@@ -113,19 +113,33 @@
|
||||
var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
|
||||
var z = this.map.getZoom();
|
||||
var limit = Math.pow(2, z);
|
||||
|
||||
|
||||
if (y < 0 || y >= limit) {
|
||||
return OpenLayers.Util.getImagesLocation() + "404.png";
|
||||
} else {
|
||||
x = ((x % limit) + limit) % limit;
|
||||
x = ((x % limit) + limit) % limit;
|
||||
return this.url + z + "/" + x + "/" + y + "." + this.type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h3>OpenLayers Spherical Mercator Example</h3>
|
||||
<div id="map"></div>
|
||||
<h1 id="title">OpenLayers Spherical Mercator Example</h1>
|
||||
|
||||
<div id="tags">
|
||||
</div>
|
||||
<p id="shortdesc">
|
||||
Shows the use of the Spherical Mercator Layers, for overlaying
|
||||
Google, Yahoo, Microsoft, and other layers with WMS and TMS tiles.
|
||||
</p>
|
||||
<div id="map"></div>
|
||||
|
||||
<div id="docs">
|
||||
This is an example of using googles Mercator projection layers in a map window
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user