-
Notifications
You must be signed in to change notification settings - Fork 15
/
e7_tipos_mapas.html
93 lines (71 loc) · 1.58 KB
/
e7_tipos_mapas.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>javascript</title>
<style>
#mapa-hybrid, #mapa-roadmap, #mapa-satellite, #mapa-terrain{
height: 400px;
width: 400px;
}
</style>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="javascript/jquery.gomap-1.3.2.min.js"></script>
<script>
function pintaMapas(posicion) {
var latitude = posicion.coords.latitude;
var longitude = posicion.coords.longitude;
$("#mapa-roadmap").goMap({
markers : [{
latitude:latitude,
longitude:longitude
}],
zoom:15,
maptype:"ROADMAP"
});
$("#mapa-satellite").goMap({
markers : [{
latitude:latitude,
longitude:longitude
}],
zoom:15,
maptype:"SATELLITE"
});
$("#mapa-hybrid").goMap({
markers : [{
latitude:latitude,
longitude:longitude
}],
zoom:15,
maptype:"HYBRID"
});
$("#mapa-terrain").goMap({
markers : [{
latitude:latitude,
longitude:longitude
}],
zoom:15,
maptype:"TERRAIN"
});
}
$(function() {
navigator.geolocation.getCurrentPosition(pintaMapas);
});
</script>
</head>
<body>
<h2>ROADMAP</h2>
<div id="mapa-roadmap">
</div>
<h2>SATELLITE</h2>
<div id="mapa-satellite">
</div>
<h2>HYBRID</h2>
<div id="mapa-hybrid">
</div>
<h2>TERRAIN</h2>
<div id="mapa-terrain">
</div>
</body>
</html>