reference.html
9.1 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>MarkerClusterer for Google Maps v3 version 1.0 Reference</title>
<link rel="stylesheet" type="text/css" href="http://code.google.com/css/codesite.css"></link>
<link rel="stylesheet" type="text/css" href="../../util/docs/template/local_extensions.css"></link>
</head>
<body>
<h1>MarkerClusterer for Google Maps v3</h1>
<p>
The library creates and manages per-zoom-level clusters for large amounts of
markers.
<br/>
This is a v3 implementation of the
<a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/"
>v2 MarkerClusterer</a>.</p>
<p>For a description and examples of how to use this library, check out the <a href="examples.html">how-to</a>.</p>
<h2><a name="MarkerClusterer"></a>class MarkerClusterer</h2>
<p> This class extends <code>google.maps.OverlayView</code>.</p>
<h3>Constructor</h3>
<table summary="class MarkerClusterer - Constructor" width="90%">
<tbody>
<tr>
<th>Constructor</th>
<th>Description</th>
</tr>
<tr class="odd">
<td><code>MarkerClusterer(<span class="type">map:google.maps.Map</span>, <span class="type">opt_markers:Array.<google.maps.Marker></span>, <span class="type">opt_options:Object</span>)</code></td>
<td>A Marker Clusterer that clusters markers.</td>
</tr>
</tbody>
</table>
<h3>Methods</h3>
<table summary="class MarkerClusterer - Methods" width="90%">
<tbody>
<tr>
<th>Methods</th>
<th>Return Value</th>
<th>Description</th>
</tr>
<tr class="odd">
<td><code>addMarker(<span class="type">marker:google.maps.Marker</span>, <span class="type">opt_nodraw:boolean</span>)</code></td>
<td><code>None</code></td>
<td>Adds a marker to the clusterer and redraws if needed.</td>
</tr>
<tr class="even">
<td><code>addMarkers(<span class="type">markers:Array.<google.maps.Marker></span>, <span class="type">opt_nodraw:boolean</span>)</code></td>
<td><code>None</code></td>
<td>Add an array of markers to the clusterer.</td>
</tr>
<tr class="odd">
<td><code>clearMarkers()</code></td>
<td><code>None</code></td>
<td>Clears all clusters and markers from the clusterer.</td>
</tr>
<tr class="even">
<td><code>getCalculator()</code></td>
<td><code>function(Array|number)</code></td>
<td>Get the calculator function.</td>
</tr>
<tr class="odd">
<td><code>getExtendedBounds(<span class="type">bounds:google.maps.LatLngBounds</span>)</code></td>
<td><code>google.maps.LatLngBounds</code></td>
<td>Extends a bounds object by the grid size.</td>
</tr>
<tr class="even">
<td><code>getGridSize()</code></td>
<td><code>number</code></td>
<td>Returns the size of the grid.</td>
</tr>
<tr class="odd">
<td><code>getMap()</code></td>
<td><code>google.maps.Map</code></td>
<td>Returns the google map that the clusterer is associated with.</td>
</tr>
<tr class="even">
<td><code>getMarkers()</code></td>
<td><code>Array.<google.maps.Marker></code></td>
<td>Returns the array of markers in the clusterer.</td>
</tr>
<tr class="odd">
<td><code>getMaxZoom()</code></td>
<td><code>number</code></td>
<td>Gets the max zoom for the clusterer.</td>
</tr>
<tr class="even">
<td><code>getStyles()</code></td>
<td><code>Object</code></td>
<td>Gets the styles.</td>
</tr>
<tr class="odd">
<td><code>getTotalClusters()</code></td>
<td><code>number</code></td>
<td>Returns the number of clusters in the clusterer.</td>
</tr>
<tr class="even">
<td><code>getTotalMarkers()</code></td>
<td><code>Array.<google.maps.Marker></code></td>
<td>Returns the array of markers in the clusterer.</td>
</tr>
<tr class="odd">
<td><code>isZoomOnClick()</code></td>
<td><code>boolean</code></td>
<td>Whether zoom on click is set.</td>
</tr>
<tr class="even">
<td><code>redraw()</code></td>
<td><code>None</code></td>
<td>Redraws the clusters.</td>
</tr>
<tr class="odd">
<td><code>removeMarker(<span class="type">marker:google.maps.Marker</span>)</code></td>
<td><code>boolean</code></td>
<td>Remove a marker from the cluster.</td>
</tr>
<tr class="even">
<td><code>resetViewport()</code></td>
<td><code>None</code></td>
<td>Clears all existing clusters and recreates them.</td>
</tr>
<tr class="odd">
<td><code>setCalculator(<span class="type">calculator:function(Array|number)</span>)</code></td>
<td><code>None</code></td>
<td>Set the calculator function.</td>
</tr>
<tr class="even">
<td><code>setGridSize(<span class="type">size:number</span>)</code></td>
<td><code>None</code></td>
<td>Returns the size of the grid.</td>
</tr>
<tr class="odd">
<td><code>setMap(<span class="type">map:google.maps.Map</span>)</code></td>
<td><code>None</code></td>
<td>Sets the google map that the clusterer is associated with.</td>
</tr>
<tr class="even">
<td><code>setMaxZoom(<span class="type">maxZoom:number</span>)</code></td>
<td><code>None</code></td>
<td>Sets the max zoom for the clusterer.</td>
</tr>
<tr class="odd">
<td><code>setStyles(<span class="type">styles:Object</span>)</code></td>
<td><code>None</code></td>
<td>Sets the styles.</td>
</tr>
</tbody>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-964209-4";
urchinTracker();
</script>
</body>
</html>