-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (41 loc) · 1.73 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!doctype html>
<html>
<head>
<title>Polymer Data Visualization</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="bower_components/google-map/google-map.html">
<link rel="import" href="bower_components/point-overlay/point-overlay.html">
<link rel="import" href="bower_components/paper-card/paper-card.html">
<link rel="import" href="bower_components/paper-slider/paper-slider.html">
<link rel="import" href="bower_components/iron-ajax/iron-ajax.html">
<link rel="stylesheet" href="styles.css">
</head>
<body unresolved>
<template is="dom-bind" id="t">
<google-map map="{{map}}" latitude="38.6" longitude="-95.8" zoom="5"
styles='[{"stylers":[{"saturation":-85}]},{"featureType":"water","stylers":[{"lightness":-20}]}]'
on-google-map-ready="setPointSize"
on-zoom-changed="setPointSize">
</google-map>
<point-overlay map="[[map]]" uniforms="{{uniforms}}" data="{{data}}">
</point-overlay>
<iron-ajax auto handle-as="json"
url="bower_components/point-overlay/tornadoes-1950-2014.json"
last-response="{{data}}">
</iron-ajax>
<!-- <paper-card elevation="2">
<paper-slider min="5" max="100" value="30"></paper-slider>
</paper-card> -->
</template>
<script>
var t = document.querySelector('#t');
t.setPointSize = function(e) {
this.uniforms.pointSize = Math.exp(0.3 * this.map.getZoom());
this.notifyPath('uniforms.pointSize', this.uniforms.pointSize);
};
</script>
</body>
</html>