Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged JS

  • Loading branch information...
commit 061c6b090788c60d9ec4df3730ca7d92e8cdf96a 2 parents d349f2c + 3c04dae
@jawj authored
View
20 web_client/index.html
@@ -2,16 +2,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script src="https://www.google.com/jsapi"></script>
-<script src="skytext.js"></script>
-<script src="font_additions.js"></script>
-<script src="rtree.js"></script>
-<script src="strftime.js"></script>
-<script src="pigeon_features.js"></script>
-<script src="data/rail_stations.js"></script>
-<script src="data/tube_stations.js"></script>
-<script src="data/schedule.js"></script>
-<script src="pigeon_sim.js"></script>
<style>
* { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: none; }
html, body { margin: 0; padding: 0; font-size: 0.95em; overflow: hidden; width: 100%; height: 100%; background: #000; }
@@ -40,5 +30,15 @@
<div id="credit"><span>CASA Smart Cities</span></div>
</div></div>
<div id="earth"></div>
+<script src="https://www.google.com/jsapi?key=AIzaSyBn_qicXeAo4g5EyqQWPtbI5WUBbdqVCrw"></script>
+<script src="skytext.js"></script>
+<script src="font_additions.js"></script>
+<script src="rtree.js"></script>
+<script src="strftime.js"></script>
+<script src="pigeon_features.js"></script>
+<script src="data/rail_stations.js"></script>
+<script src="data/tube_stations.js"></script>
+<script src="data/schedule.js"></script>
+<script src="pigeon_sim.js"></script>
</body>
</html>
View
2  web_client/pigeon_features.coffee
@@ -181,9 +181,11 @@ class @MiscSet extends FeatureSet
logo = new CASALogo("casa-logo", 51.52192375643773, -0.13593167066574097)
@addFeature(logo)
+ ###
conf = new CASAConf('casa-conf', 51.5210609212573, -0.1287245750427246)
conf.update()
@addFeature(conf)
+ ###
bb = new BigBen('big-ben', 51.5007286626542, -0.12459531426429749)
bb.update()
View
11 web_client/pigeon_features.js
@@ -339,15 +339,18 @@
__extends(MiscSet, _super);
function MiscSet(featureManager) {
- var bb, ch, conf, logo, tb;
+ var bb, ch, logo, tb;
MiscSet.__super__.constructor.call(this, featureManager);
ch = new CityHall("city-hall", 51.50477580586208, -0.07864236831665039);
this.addFeature(ch);
logo = new CASALogo("casa-logo", 51.52192375643773, -0.13593167066574097);
this.addFeature(logo);
- conf = new CASAConf('casa-conf', 51.5210609212573, -0.1287245750427246);
- conf.update();
- this.addFeature(conf);
+ /*
+ conf = new CASAConf('casa-conf', 51.5210609212573, -0.1287245750427246)
+ conf.update()
+ @addFeature(conf)
+ */
+
bb = new BigBen('big-ben', 51.5007286626542, -0.12459531426429749);
bb.update();
this.addFeature(bb);
View
7 web_client/pigeon_sim.coffee
@@ -1,7 +1,5 @@
-google.load('earth', '1.x', {'other_params':'sensor=false'})
-
-window.onload = ->
+google.setOnLoadCallback ->
unless window.WebSocket
alert('This app needs browser WebSocket support')
return
@@ -222,4 +220,5 @@ window.onload = ->
connect()
google.earth.createInstance('earth', earthInitCallback, -> console.log("Google Earth error: #{errorCode}"))
-
+
+google.load('earth', '1', {'other_params':'sensor=false'})
View
12 web_client/pigeon_sim.js
@@ -4,11 +4,7 @@
__slice = [].slice,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
- google.load('earth', '1.x', {
- 'other_params': 'sensor=false'
- });
-
- window.onload = function() {
+ google.setOnLoadCallback(function() {
var addLayers, altStatus, animTick, animTicks, animTimeout, cam, camMoves, compassPts, connect, debugDataStatus, debugEarthAPIStatus, debugTicksStatus, earthInitCallback, el, els, features, flapAmount, flown, fm, ge, headingStatus, id, inMsgs, k, kvp, lastFlap, lastMove, latFactor, lonFactor, lonRatio, moveCam, objClone, objsEq, params, pi, piOver180, resetCam, seenCam, speed, titleStatus, truncNum, twoPi, updateCam, v, w, wrapDegs180, wrapDegs360, _i, _len, _ref, _ref1, _ref2;
if (!window.WebSocket) {
alert('This app needs browser WebSocket support');
@@ -340,6 +336,10 @@
return google.earth.createInstance('earth', earthInitCallback, function() {
return console.log("Google Earth error: " + errorCode);
});
- };
+ });
+
+ google.load('earth', '1', {
+ 'other_params': 'sensor=false'
+ });
}).call(this);
Please sign in to comment.
Something went wrong with that request. Please try again.