This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.html
41 lines (37 loc) · 1.39 KB
/
map.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
<!doctype html>
<!-- Copyright (c) 2014 Google Inc. All rights reserved. -->
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Google Map demo</title>
<script src="./bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="bower_components/google-map/google-map.html">
<link rel="import" href="bower_components/google-map/google-map-directions.html">
<style>
#controlsToggle {
position: absolute;
left: 10%;
bottom: 10%;
}
</style>
</head>
<body fullbleed unresolved>
<google-map latitude="37.779" longitude="-122.3892" minZoom="11" maxZoom="14" fit>
<google-map-marker latitude="41.807096" longitude="-91.49542"
title="Big Grove" draggable="true">
<img src="images/big-grove.png" />
</google-map-marker>
</google-map>
<google-map-directions startAddress="2800 UCC, Iowa City, IA" endAddress="Big Grove Brewery, West Main Street, Solon, IA"></google-map-directions>
<button id="controlsToggle" onclick="toggleControls()">Toggle controls</button>
<script>
var gmap = document.querySelector('google-map');
gmap.addEventListener('api-load', function(e) {
document.querySelector('google-map-directions').map = this.map;
});
function toggleControls() {
gmap.disableDefaultUI = !gmap.disableDefaultUI;
}
</script>
</body>
</html>