/api/examples/bing.html
http://webglearth.googlecode.com/ · HTML · 31 lines · 28 code · 3 blank · 0 comment · 0 complexity · 4cd2bd5f11c97cd1c3fdfb2814053326 MD5 · raw file
- <!DOCTYPE HTML>
- <html>
- <head>
- <script src="http://www.webglearth.com/api.js"></script>
- <script>
- var earth;
- var bingA, bingAWL, bingR;
- function initialize() {
- var options = { zoom: 3, position: [49.190791, 16.61165], proxyHost: 'http://data.webglearth.com/cgi-bin/corsproxy.fcgi?url=' };
- earth = new WebGLEarth('earth_div', options);
-
- // Get your own key from: https://www.bingmapsportal.com/
- var bingKey = 'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
-
- bingA = earth.initMap(WebGLEarth.Maps.BING, ['Aerial', bingKey]);
- bingAWL = earth.initMap(WebGLEarth.Maps.BING, ['AerialWithLabels', bingKey]);
- bingR = earth.initMap(WebGLEarth.Maps.BING, ['Road', bingKey]);
-
- earth.setBaseMap(bingAWL);
- }
- </script>
- </head>
- <body onload="initialize()">
- <h1>WebGL Earth API: Bing Maps</h1>
- <div id="earth_div" style="width:600px;height:400px;border:1px solid gray; padding:2px;"></div>
- Click to switch the map:
- <a href="#" onClick="earth.setBaseMap(bingR); return false;">Road</a>
- <a href="#" onClick="earth.setBaseMap(bingAWL); return false;">Aerial with labels</a>
- <a href="#" onClick="earth.setBaseMap(bingA); return false;">Aerial</a>
- </body>
- </html>