-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindexgeo.html
140 lines (83 loc) · 2.55 KB
/
indexgeo.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<title>wszystkomizjedli</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.custom.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function(){
$('#content2').animate({'margin-left':'0px'}, 40000,'linear');
});
function geoFindMe() {
var output = document.getElementById("out");
if (!navigator.geolocation){
output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
return;
}
function success(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
output.innerHTML = '<p>Latitude is ' + latitude + '° <br>Longitude is ' + longitude + '°</p>';
var img = new Image();
img.src = "http://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&zoom=13&size=300x300&sensor=false";
output.appendChild(img);
};
function error() {
output.innerHTML = "Unable to retrieve your location";
};
output.innerHTML = "<p>Locating…</p>";
navigator.geolocation.getCurrentPosition(success, error);
}
</script>
<!-- START SOUND CODE V4.1 HTML5 -->
<script language="JavaScript" type="text/javascript">
<!--
// PLAYER VARIABLES
var mp3snd = "my.mp3";
var oggsnd = "my.ogg";
document.write('<audio loop autoplay="autoplay">');
document.write('<source src="'+mp3snd+'" type="audio/mpeg">');
document.write('<source src="'+oggsnd+'" type="audio/ogg">');
document.write('<!--[if lt IE 9]>');
document.write('<bgsound src="'+mp3snd+'" loop="100">');
document.write('<![endif]-->');
document.write('</audio>');
//-->
</script>
<script language="JavaScript" type="text/javascript">
</script>
<br>
<!-- END SOUND CODE V4.1 -->
</head>
<body>
<div id="content_wrapper">
<p><button onclick="geoFindMe()">Show my location</button></p>
<div id="out"></div>
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
<div id="content">
<img src="tr.png"/>
<div id="content2">
</div>
</div>
</div>
<div id="footer"><img src="tr.png"/></div>
</body>
</html>