diff options
Diffstat (limited to 'misc/openlayers/examples/bing.html')
-rw-r--r-- | misc/openlayers/examples/bing.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/misc/openlayers/examples/bing.html b/misc/openlayers/examples/bing.html new file mode 100644 index 0000000..3f0c4cb --- /dev/null +++ b/misc/openlayers/examples/bing.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <meta name="apple-mobile-web-app-capable" content="yes"> + <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="../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() { + map = new OpenLayers.Map("map"); + + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + var road = new OpenLayers.Layer.Bing({ + name: "Road", + key: apiKey, + type: "Road" + }); + var hybrid = new OpenLayers.Layer.Bing({ + name: "Hybrid", + key: apiKey, + type: "AerialWithLabels" + }); + var aerial = new OpenLayers.Layer.Bing({ + name: "Aerial", + key: apiKey, + type: "Aerial" + }); + + map.addLayers([road, hybrid, aerial]); + + map.setCenter(new OpenLayers.LonLat(-110, 45), 3); + } + + </script> + </head> + <body onload="init()"> + <h1 id="title">Bing Example</h1> + + <div id="tags"> + Bing, Microsoft, Virtual Earth, light + </div> + + <p id="shortdesc"> + Demonstrates the use of Bing layers. + </p> + + <div id="map" class="smallmap"></div> + <div id="docs"><p>This example demonstrates the ability to create layers + using tiles from Bing maps.</p></div> + </body> +</html> + + |