This repository was archived by the owner on Jul 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathexamples.html
More file actions
150 lines (133 loc) · 3.66 KB
/
examples.html
File metadata and controls
150 lines (133 loc) · 3.66 KB
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
141
142
143
144
145
146
147
148
149
150
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=620, initial-scale=1, maximum-scale=1">
<title>jQuery gMap - Examples</title>
<link href='http://fonts.googleapis.com/css?family=Lato:bolditalic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/example.css" />
</head>
<body>
<a href="http://github.com/marioestrada/jQuery-gMap"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<h1 class="title">jQuery gMap - Google Maps API V3</h1>
<p><strong>gMap</strong> is a jQuery plugin that helps you embed Google Maps into your website. With less than 2 KB (minified and gzipped) in size it is very flexible and highly customizable</p>
<p>Original version by <a href="http://gmap.nurtext.de/">Cedric Kasner</a>, modified by <a href="http://mario.ec">Mario Estrada</a> to use the <a href="http://code.google.com/apis/maps/documentation/javascript/">Google Maps API V3</a>.</p>
<h1 id="examples">Examples</h1>
<h2>Default View</h2>
<div id="map" class="map">
<p>This will be replaced with the Google Map.</p>
</div>
<h3>Code:</h3>
<pre>
$('#map').gMap();
</pre>
<h2>Custom Controls and Map Type</h2>
<div id="map_controls" class="map">
<p>This will be replaced with the Google Map.</p>
</div>
<h3>Code:</h3>
<pre>
$('#map_controls').gMap(
{
latitude: -2.206,
longitude: -79.897,
maptype: 'TERRAIN',
zoom: 8,
controls: {
panControl: true,
zoomControl: false,
mapTypeControl: true,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false
}
});
</pre>
<h2>Markers</h2>
<div id="map_addresses" class="map">
<p>This will be replaced with the Google Map.</p>
</div>
<h3>Code:</h3>
<pre>
$('#map_addresses').gMap({
address: "Quito, Ecuador",
zoom: 5,
markers:[
{
latitude: -2.2014,
longitude: -80.9763,
html: "_latlng"
},
{
address: "Guayaquil, Ecuador",
html: "My Hometown",
popup: true
},
{
address: "Galapagos, Ecuador",
html: "_address"
}
]
});
</pre>
<h2>Kitchen Sink - Extended Usage</h2>
<div id="map_extended" class="map">
<p>This will be replaced with the Google Map.</p>
</div>
<h3>Code:</h3>
<pre>
$("#map_extended").gMap({
controls: false,
scrollwheel: true,
maptype: 'TERRAIN',
markers: [
{
latitude: 47.670553,
longitude: 9.588479,
icon: {
image: "images/gmap_pin_orange.png",
iconsize: [26, 46],
iconanchor: [12,46]
}
},
{
latitude: 47.65197522925437,
longitude: 9.47845458984375
},
{
latitude: 47.594996,
longitude: 9.600708,
icon: {
image: "images/gmap_pin_grey.png",
iconsize: [26, 46],
iconanchor: [12,46]
}
}
],
icon: {
image: "images/gmap_pin.png",
iconsize: [26, 46],
iconanchor: [12, 46]
},
latitude: 47.58969,
longitude: 9.473413,
zoom: 10
});
</pre>
<div id="footer">
<p><strong>Licensed under Creative Commons <a href="http://creativecommons.org/licenses/by-sa/3.0/">BY-SA 3.0</a>.</strong></p>
</div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jquery.gmap.js"></script>
<script type="text/javascript" src="examples.js"></script>
<script type="text/javascript" charset="utf-8">
$('body').delegate('a[href^="#"]', 'click', function()
{
var id = $(this).attr('href').replace('#', '');
var offset = $('#' + id).offset();
$('html, body').animate({ scrollTop: offset.top }, 350);
});
</script>
</body>
</html>