documenting that Layer.VirtualEarth requires restrictedExtent to be set, and changing the examples accordingly. p=marcjansen (closes #3123)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11503 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-02-25 14:27:54 +00:00
parent 7ec361cda9
commit d7afd24ac5
3 changed files with 130 additions and 97 deletions

View File

@@ -12,9 +12,18 @@
<script>
var map;
function init(){
map = new OpenLayers.Map("map");
// setting restrictedExtent so that we can use the
// VirtualEarth-layers, see e.g.
// http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/VirtualEarth-js.html
var restrictedExtent = new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508);
map = new OpenLayers.Map("map", {
restrictedExtent: restrictedExtent
});
map.addControl(new OpenLayers.Control.LayerSwitcher());
var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {