-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestLocationJS.html
54 lines (47 loc) · 1.33 KB
/
testLocationJS.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
53
54
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Geocoding Simple</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="./js/locationMap.js"></script>
<script>
var a = new Array();
var t = new Object();
t.name = "hello 0"
t.id = 1
t.lat = 47.40458
t.lng = 8.402784
a[0] = t;
var t = new Object();
t.name = "hello 1"
t.id = 2
//t.lat = 47.403176922494225
// t.lng = 8.40207516409489
t.lat = 0
t.lng = 0
a[1] = t;
var t = new Object();
t.name = "hello 2"
t.id = 3
t.lat = 47.40195827146184
t.lng = 8.398957991997614
a[2] = t;
function call(){
var result = codeAddress("dietikon, zurich", a);
alert(" sdfsd");
for (var i = 0; i < result.length; i++) {
alert("Id: " + result[i].id + " lat: " + result[i].lat + " lng: " + result[i].lat);
}
}
</script>
</head>
<body style="margin:0px; padding:0px;" onload="call()">
<!-- <div>
<input id="address" type="textbox" value="dietikon hofackerstr 21">
<input type="button" value="Geocode" onclick="call()">
</div>
-->
<div id="map_canvas" style="width:50%; height:50%"></div>
</body>
</html>