replace VirtualEarth layers with Bing in examples. No functional change.

This commit is contained in:
fredj
2011-09-28 09:17:38 +02:00
parent d48b3e7df4
commit 2f4e034ef2
2 changed files with 35 additions and 30 deletions

View File

@@ -7,35 +7,37 @@
<title>OpenLayers Bing Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;mkt=en-us"></script>
<script src="../lib/OpenLayers.js"></script>
<script>
// API key for http://openlayers.org. Please get your own at
// http://bingmapsportal.com/ and use that instead.
var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
var map;
function init(){
// 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(-180, -90,
180, 90);
function init() {
map = new OpenLayers.Map("map");
map.addControl(new OpenLayers.Control.LayerSwitcher());
var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {
type: VEMapStyle.Shaded
var road = new OpenLayers.Layer.Bing({
name: "Road",
key: apiKey,
type: "Road"
});
var hybrid = new OpenLayers.Layer.VirtualEarth("Hybrid", {
type: VEMapStyle.Hybrid
var hybrid = new OpenLayers.Layer.Bing({
name: "Hybrid",
key: apiKey,
type: "AerialWithLabels"
});
var aerial = new OpenLayers.Layer.VirtualEarth("Aerial", {
type: VEMapStyle.Aerial
var aerial = new OpenLayers.Layer.Bing({
name: "Aerial",
key: apiKey,
type: "Aerial"
});
map.addLayers([shaded, hybrid, aerial]);
map.addLayers([road, hybrid, aerial]);
map.setCenter(new OpenLayers.LonLat(-110, 45), 3);
}