Skip to content

Commit

Permalink
Use new Bing Maps API key for app and dev
Browse files Browse the repository at this point in the history
  • Loading branch information
petrsloup committed Oct 8, 2015
1 parent 94133db commit 1f059a0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
28 changes: 14 additions & 14 deletions deploy/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, all" />
<title>WebGL Earth API - Demo</title>

<script src="api.js"></script>

<script>
Expand All @@ -22,30 +22,30 @@
zooming: true,
proxyHost: 'http://srtm.webglearth.com/cgi-bin/corsproxy.fcgi?url='
});

app.showMiniGlobe('../deploy/world512.jpg', 128);

// Get your own key from: https://www.bingmapsportal.com/
var bingKey = 'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
var bingKey = 'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';

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

mapBo = app.initMap(WebGLEarth.Maps.BING, ['AerialWithLabels', bingKey]);
mapMo = app.initMap(WebGLEarth.Maps.MAPQUEST);

customTMS = app.initMap(WebGLEarth.Maps.CUSTOM, ['TMS','http://webglearth.googlecode.com/svn/resources/tms/{z}/{x}/{y}.jpg',1,5,256,true]);

//make the overlays transparent
mapBo.setOpacity(0.5);
mapMo.setOpacity(0.5);

setInterval(function() {
document.getElementById('infodiv').innerHTML = app.getHeading() + ', ' + app.getTilt();
}, 100);


//Print coordinates of the mouse
var printCoords = function(e) {
document.getElementById('coordsbox').innerHTML =
Expand All @@ -62,12 +62,12 @@
};
listenKey = app.on('click', alertCoords);
}

function addSomeMarkers() {
var londonM = app.initMarker(51.507222, -0.1275);
var denverM = app.initMarker(39.739167, -104.984722);
var cairoM = app.initMarker(30.058056, 31.228889);

londonM.bindPopup('<h2>London</h2>This marker is already opened.', 250).openPopup();
denverM.bindPopup('<h2>Denver</h2>You can\'t see this marker without rotating the Earth.');

Expand All @@ -78,11 +78,11 @@
londonM.closePopup();
};
cairoM.on('click', closeLondon);

document.getElementById("addmarkers").disabled = true;
}
</script>

</head>
<body onload="javascript:startWE()">
<div id="webglearthdiv" style="width:600px;height:400px;"></div>
Expand Down Expand Up @@ -123,4 +123,4 @@
<br />
<img id="screenshot" />
</body>
</html>
</html>
8 changes: 5 additions & 3 deletions src-app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ weapp.App = function() {
var initedMaps = {}; //cache
var maptypeElement = /** @type {!HTMLSelectElement} */
(goog.dom.getElement('maptype'));
goog.events.listen(maptypeElement, goog.events.EventType.CHANGE, function(e) {
var updateLayer = goog.bind(function() {
var key = maptypeElement.options[maptypeElement.selectedIndex].value;
switch (key) {
case 'bing_aerial':
Expand Down Expand Up @@ -129,7 +129,9 @@ weapp.App = function() {
default:
break;
}
}, false, this);
}, this);
goog.events.listen(maptypeElement, goog.events.EventType.CHANGE, updateLayer);
updateLayer();

/* HASH UPDATING & PARSING */

Expand Down Expand Up @@ -215,7 +217,7 @@ weapp.App = function() {
* @define {string} bing key.
*/
weapp.App.BING_KEY =
'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';


/**
Expand Down
2 changes: 1 addition & 1 deletion src/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
app.showMiniGlobe('../deploy/world512.jpg', 128);

// Get your own key from: https://www.bingmapsportal.com/
var bingKey = 'AsLurrtJotbxkJmnsefUYbatUuBkeBTzTL930TvcOekeG8SaQPY9Z5LDKtiuzAOu';
var bingKey = 'AuCVBGPx1VQORSzUMGplLr3JTilLi3lUA3WnqT5SbKcUP5H2s9mh9XsHfy_VKmdG';

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

0 comments on commit 1f059a0

Please sign in to comment.