source: ether_iasi/trunk/web/resources/js/OpenLayers-2.12/examples/bing.html @ 738

Last change on this file since 738 was 738, checked in by vmipsl, 11 years ago

OpenLayers?

File size: 1.9 KB
Line 
1<!DOCTYPE html>
2<html>
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
6    <meta name="apple-mobile-web-app-capable" content="yes">
7    <title>OpenLayers Bing Example</title>
8    <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
9    <link rel="stylesheet" href="style.css" type="text/css">
10
11    <script src="../lib/OpenLayers.js"></script>
12    <script>
13
14        // API key for http://openlayers.org. Please get your own at
15        // http://bingmapsportal.com/ and use that instead.
16        var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
17        var map;
18
19        function init() {
20            map = new OpenLayers.Map("map");
21           
22            map.addControl(new OpenLayers.Control.LayerSwitcher());
23
24            var road = new OpenLayers.Layer.Bing({
25                name: "Road",
26                key: apiKey,
27                type: "Road"
28            });
29            var hybrid = new OpenLayers.Layer.Bing({
30                name: "Hybrid",
31                key: apiKey,
32                type: "AerialWithLabels"
33            });
34            var aerial = new OpenLayers.Layer.Bing({
35                name: "Aerial",
36                key: apiKey,
37                type: "Aerial"
38            });
39
40            map.addLayers([road, hybrid, aerial]);
41
42            map.setCenter(new OpenLayers.LonLat(-110, 45), 3);
43        }
44
45    </script>
46  </head>
47  <body onload="init()">
48    <h1 id="title">Bing Example</h1>
49
50    <div id="tags">
51        Bing, Microsoft, Virtual Earth, light
52    </div>
53
54    <p id="shortdesc">
55        Demonstrates the use of Bing layers.
56    </p>
57
58    <div id="map" class="smallmap"></div>
59    <div id="docs"><p>This example demonstrates the ability to create layers
60        using tiles from Bing maps.</p></div>
61  </body>
62</html>
63
64
Note: See TracBrowser for help on using the repository browser.