Blame view

docs/reference.html 10.8 KB
dbaadcdd8   Tom Huang   Signed-off-by: To...
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
  <!doctype html>
  <html>
    <head>
      <meta charset="utf-8">
      <title>MarkerClusterer for Google Maps v3 version 1.0 Reference</title>
      <style>
        body {
          font-family: arial, sans-serif;
          background-color: #fff;
          font-size: small;
          margin: 24px 8px 8px;
          color: #000;
        }
        h1, h2, h3, h4, h5 {
          font-weight: bold;
          margin-bottom: 0;
        }
        h2, h3, h4, h5 {
          margin-left: 25px;
        }
        h1 {
          font-size: 130%;
          margin: 2em 0 0 10px; 
          padding: 0 3px 0 3px;
          border-top: 1px solid;
          background-color: #e5ecf9;
          border-color: #3366CC;
        }
        h2 {
          font-size: 120%;
          margin-top: 1.5em;
          border-bottom: 1px solid;
          border-color: #3366CC;
        }
        h3 {
          font-size: 110%; 
          margin-top: 0.7em;
          position: relative;
          left: 0;
          top: 0.7em;
          z-index: 5; /*to avoid falling behind other elements due to lowered position*/
        }
        h4 {
          margin-top: .5em;
          font-size: 100%;
          font-weight: bold;
          position: relative;
          left: 0;
          top: 0.8em;
          z-index: 5; /*to avoid falling behind other elements due to lowered position*/
        }
        h5 {
          margin-top: 0.4em;
          font-size: 100%;
          font-weight: 100;
          font-style: italic;
          text-decoration: underline;
          position: relative;
          left: 0;
          top: 0.8em;
          z-index: 5; /*to avoid falling behind other elements due to lowered position*/
        }
        p {
          margin: 1em 0 0 25px;
          padding: 0;
        }
        table {
          border: 1px solid;
          border-color: #3366CC;
          border-spacing:0;
          margin: 1em 0 0 26px;
          border-collapse: collapse;
          clear: right;
        }
        pre {
          margin-left: 2em;
        }
        ol, ul {
          margin-left: 2em;
        }
      </style>
      <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-12846745-20']);
        _gaq.push(['_trackPageview']);
  
        (function() {
          var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
          ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
      </script>
    </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.&lt;google.maps.Marker&gt;</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&nbsp;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.&lt;google.maps.Marker&gt;</span>, <span class="type">opt_nodraw:boolean</span>)</code></td>
                  
                    
                      <td><code>None</code></td>
                    
                  
                  <td>Adds 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>Gets 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>Gets the size of the grid.</td>
                </tr>
              
                <tr class="odd">
                  <td><code>getMap()</code></td>
                  
                    
                      <td><code>google.maps.Map</code></td>
                    
                  
                  <td>Gets 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>Gets 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>Gets 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>Gets 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>Removes 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>Sets 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>Sets 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>
    </body>
  </html>