-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
35 lines (30 loc) · 1.02 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://js.api.here.com/v3/3.1/mapsjs-core.js" type="text/javascript" charset="utf-8"></script>
<script src="https://js.api.here.com/v3/3.1/mapsjs-service.js" type="text/javascript" charset="utf-8"></script>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</head>
<body>
<h1>Meu Mapa</h1>
<form action="" id="form">
<input type="text" id="endereco">
<input type="submit">
</form>
<div style="width: 640px; height: 480px" id="mapContainer">
</div>
<script src="rota.js"></script>
<script>
const form = document.getElementById('form')
form.addEventListener("submit", function (event) {
event.preventDefault();
const input = document.getElementById("endereco").value + ", Brazil"
geocodingParams = { searchText: input };
geocoder.geocode(geocodingParams, onResult);
})
</script>
</body>
</html>