-
Notifications
You must be signed in to change notification settings - Fork 821
/
sample.html
executable file
·52 lines (46 loc) · 1.49 KB
/
sample.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
50
51
52
<!-- [START maps_places_autocomplete_directions] -->
<!DOCTYPE html>
<html>
<head>
<title>Place Autocomplete and Directions</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<link rel="stylesheet" type="text/css" href="./style.css" />
<script src="./index.js"></script>
</head>
<body>
<div style="display: none">
<input
id="origin-input"
class="controls"
type="text"
placeholder="Enter an origin location"
/>
<input
id="destination-input"
class="controls"
type="text"
placeholder="Enter a destination location"
/>
<div id="mode-selector" class="controls">
<input
type="radio"
name="type"
id="changemode-walking"
checked="checked"
/>
<label for="changemode-walking">Walking</label>
<input type="radio" name="type" id="changemode-transit" />
<label for="changemode-transit">Transit</label>
<input type="radio" name="type" id="changemode-driving" />
<label for="changemode-driving">Driving</label>
</div>
</div>
<div id="map"></div>
<!-- Async script executes immediately and must be after any DOM elements used in callback. -->
<script
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=places&v=weekly"
async
></script>
</body>
</html>
<!-- [END maps_places_autocomplete_directions] -->