-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
121 lines (84 loc) · 2.74 KB
/
example.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
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="jquery-ux-map.css">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="jquery-ux-map.js"></script>
<script>
$(function() {
$( ".map" ).mapper();
$( ".map2" ).mapper({
zoom:12,
lat:55.9531,
lng: -3.1889,
complete:function(e) {
var marker = new google.maps.Marker({
position: {lat: 55.9531, lng: -3.1889},
map: e.map
});
}
});
});
</script>
<meta charset="utf-8">
<title>jQuery UX Map</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Jquery UX Map.</h1>
<p>A jQuery plugin designed to fix usability issues with Google Maps embedded on to web pages </p>
<p><strong>Features:</strong></p>
<ul>
<li>Desktop users can use the mouse wheel to scroll down the page. </li>
<li>Mobile users can drag the map down without getting 'stuck' dragging the map.</li>
<li>Clicking, or touching the map 'enables' the map, allowing scroll wheel zoom.</li>
<li>Touching, dragging or scrolling away 'disables' the map.</li>
<li>Map height it limited so that mobile users don't 'stuck' dragging the map.</li>
<li>Map centers in the page so mobile users have an area above / below to drag away from the map.</li>
<li>Full screen view is especially useful for mobile users.</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3>Simple Map</h3>
</div>
<div class="col-sm-6">
<div class="map" style="height:400px; background:blue"></div>
</div>
<div class="col-sm-6">
<pre>
$( ".map" ).mapper();
</pre>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3>Map, using callback to then add marker</h3>
</div>
<div class="col-sm-6">
<div class="map2" style="height:400px; background:blue"></div>
</div>
<div class="col-sm-6">
<pre>
$( ".map2" ).mapper({
zoom:12,
lat:55.9531,
lng: -3.1889,
complete:function(e) {
var marker = new google.maps.Marker({
position: {lat: 55.9531, lng: -3.1889},
map: e.map
});
}
});
</pre>
</div>
</div>
</div>
</body>
</html>