-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplacePosition.html
87 lines (74 loc) · 2.22 KB
/
placePosition.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
<html>
<head>
<title>The Place</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="https://rawgithub.com/HPNeo/gmaps/master/gmaps.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="http://www.amazium.co.uk/includes/base.css">
<link rel="stylesheet" href="http://www.amazium.co.uk/includes/amazium.css">
<link rel="stylesheet" href="http://www.amazium.co.uk/includes/layout.css">
<script type="text/javascript">
var map, ubi, set=true, test, latmov, lonmov;
$(document).ready(function(){
$("#contenedor").hide();
map = new GMaps({
div: '#map',
lat: 0,
lng: 0,
zoom: 2,
click: function(e) {
if (set) {
latmov = e.latLng.lat();
lonmov = e.latLng.lng();
$("#contenedor").show();
$("#mylat").text(latmov);
$("#mylon").text(lonmov);
ubi = map.addMarker({
lat: e.latLng.lat(),
lng: e.latLng.lng(),
title: 'The Place',
draggable: true,
drag: function (i){
latmov = i.latLng.lat();
lonmov = i.latLng.lng();
$("#mylat").text(latmov);
$("#mylon").text(lonmov);
}
});
set = false;
};
},
});
});
</script>
</head>
<body>
<div class="row">
<div class="grid_12 offset_5">
<h1>Place Position</h1>
</div>
</div>
<div class="row">
<div id="map" class="grid_12" style="height:400px;">
</div>
</div>
<div class="row">
<div id="contenedor" class="grid_12">
<div class="row">
<h3 class="grid_5 offset_2" >The latitud is:<b id="mylat"></b> </h3>
</div>
<div class="row">
<h3 class="grid_5" >The longitud is:<b id="mylon"></b> </h3>
</div>
</div>
</div>
</body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43222035-1', 'toolsdevweb.com');
ga('send', 'pageview');
</script>
</html>