-
Notifications
You must be signed in to change notification settings - Fork 52
/
google.html
44 lines (33 loc) · 1.34 KB
/
google.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
<!DOCTYPE html>
<html>
<body>
<!--
This example uses:
Google Maps
Handlebars templates for the popups
-->
<div id="map" style="height: 500px; width: 600px"></div>
<script type="text/javascript" src="common/tabletop.js"></script>
<script type="text/javascript" src="common/handlebars.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="../src/mapsheet.js"></script>
<script id="popup-template" type="text/x-handlebars-template">
<h3>{{town}}</h3>
<p>{{streetaddress}}</p>
</script>
<script type="text/javascript">
window.onload = function() { init() };
var public_spreadsheet_url = 'https://docs.google.com/spreadsheet/pub?key=0AtG9_k99Q_n6dGRTMzVtNmdoclNHdXVfRWl6YkFoclE&output=html';
function init() {
var source = document.getElementById("popup-template").innerHTML;
var template = Handlebars.compile(source);
Mapsheet( { key: public_spreadsheet_url,
element: "map",
provider: Mapsheet.Providers.Google,
popupTemplate: template
} );
}
document.write("The published spreadsheet is located at <a target='_new' href='" + public_spreadsheet_url + "'>" + public_spreadsheet_url + "</a>");
</script>
</body>
</html>