Skip to content

Commit 1f059a0

Browse files
committed
Use new Bing Maps API key for app and dev
1 parent 94133db commit 1f059a0

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

deploy/api.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
66
<meta name="robots" content="index, all" />
77
<title>WebGL Earth API - Demo</title>
8-
8+
99
<script src="api.js"></script>
1010

1111
<script>
@@ -22,30 +22,30 @@
2222
zooming: true,
2323
proxyHost: 'http://srtm.webglearth.com/cgi-bin/corsproxy.fcgi?url='
2424
});
25-
25+
2626
app.showMiniGlobe('../deploy/world512.jpg', 128);
27-
27+
2828
// Get your own key from: https://www.bingmapsportal.com/
29-
var bingKey = 'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
30-
29+
var bingKey = 'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';
30+
3131
mapB = app.initMap(WebGLEarth.Maps.BING, ['AerialWithLabels', bingKey]);
3232
mapM = app.initMap(WebGLEarth.Maps.MAPQUEST);
3333
app.setBaseMap(mapM);
3434

3535
mapBo = app.initMap(WebGLEarth.Maps.BING, ['AerialWithLabels', bingKey]);
3636
mapMo = app.initMap(WebGLEarth.Maps.MAPQUEST);
37-
37+
3838
customTMS = app.initMap(WebGLEarth.Maps.CUSTOM, ['TMS','http://webglearth.googlecode.com/svn/resources/tms/{z}/{x}/{y}.jpg',1,5,256,true]);
3939

4040
//make the overlays transparent
4141
mapBo.setOpacity(0.5);
4242
mapMo.setOpacity(0.5);
43-
43+
4444
setInterval(function() {
4545
document.getElementById('infodiv').innerHTML = app.getHeading() + ', ' + app.getTilt();
4646
}, 100);
47-
48-
47+
48+
4949
//Print coordinates of the mouse
5050
var printCoords = function(e) {
5151
document.getElementById('coordsbox').innerHTML =
@@ -62,12 +62,12 @@
6262
};
6363
listenKey = app.on('click', alertCoords);
6464
}
65-
65+
6666
function addSomeMarkers() {
6767
var londonM = app.initMarker(51.507222, -0.1275);
6868
var denverM = app.initMarker(39.739167, -104.984722);
6969
var cairoM = app.initMarker(30.058056, 31.228889);
70-
70+
7171
londonM.bindPopup('<h2>London</h2>This marker is already opened.', 250).openPopup();
7272
denverM.bindPopup('<h2>Denver</h2>You can\'t see this marker without rotating the Earth.');
7373

@@ -78,11 +78,11 @@
7878
londonM.closePopup();
7979
};
8080
cairoM.on('click', closeLondon);
81-
81+
8282
document.getElementById("addmarkers").disabled = true;
8383
}
8484
</script>
85-
85+
8686
</head>
8787
<body onload="javascript:startWE()">
8888
<div id="webglearthdiv" style="width:600px;height:400px;"></div>
@@ -123,4 +123,4 @@
123123
<br />
124124
<img id="screenshot" />
125125
</body>
126-
</html>
126+
</html>

src-app/main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ weapp.App = function() {
9090
var initedMaps = {}; //cache
9191
var maptypeElement = /** @type {!HTMLSelectElement} */
9292
(goog.dom.getElement('maptype'));
93-
goog.events.listen(maptypeElement, goog.events.EventType.CHANGE, function(e) {
93+
var updateLayer = goog.bind(function() {
9494
var key = maptypeElement.options[maptypeElement.selectedIndex].value;
9595
switch (key) {
9696
case 'bing_aerial':
@@ -129,7 +129,9 @@ weapp.App = function() {
129129
default:
130130
break;
131131
}
132-
}, false, this);
132+
}, this);
133+
goog.events.listen(maptypeElement, goog.events.EventType.CHANGE, updateLayer);
134+
updateLayer();
133135

134136
/* HASH UPDATING & PARSING */
135137

@@ -215,7 +217,7 @@ weapp.App = function() {
215217
* @define {string} bing key.
216218
*/
217219
weapp.App.BING_KEY =
218-
'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
220+
'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';
219221

220222

221223
/**

src/api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
app.showMiniGlobe('../deploy/world512.jpg', 128);
2929

3030
// Get your own key from: https://www.bingmapsportal.com/
31-
var bingKey = 'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
31+
var bingKey = 'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';
3232

3333
mapB = app.initMap(WebGLEarth.Maps.BING, ['AerialWithLabels', bingKey]);
3434
mapM = app.initMap(WebGLEarth.Maps.MAPQUEST);

0 commit comments

Comments
 (0)