├── .gitignore ├── LICENSE ├── README.md ├── analysis.json ├── bower.json ├── demo ├── data.json ├── index.html ├── markerclusterer-container.html ├── my-css-pie.html ├── my-custom-clustericon.html ├── my-custom-marker.html └── simple.html ├── google-map-defaulticon.html ├── google-map-markercluster-icon-behavior.html ├── google-map-markercluster.html ├── google-map-markerclusterer.html ├── google-map-overlayview-behavior.html ├── google-map-overlayview-marker-behavior.html ├── google-map-overlayview.html ├── index.html ├── preview.gif └── preview.png /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | node_modules 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2016 Google, Inc. http://angularjs.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # <google-map-markerclusterer> 2 | 3 | > Port of [Markerclusterer-Plus](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html) as a Web Component using Polymer. 4 | 5 | ![Markerclusterer-Plus](https://raw.githubusercontent.com/timeu/google-map-markerclusterer/master/preview.gif "google-map-markerclusterer") 6 | 7 | ## Demo 8 | > [Check it live](http://timeu.github.io/google-map-markerclusterer/components/google-map-markerclusterer/demo/index.html). 9 | 10 | ## Install 11 | 12 | Install the component using [Bower](http://bower.io/): 13 | 14 | ```sh 15 | $ bower install google-map-markerclusterer --save 16 | ``` 17 | 18 | Or [download as ZIP](https://github.com/timeu/google-map-markerclusterer/archive/master.zip). 19 | 20 | ## Usage 21 | 22 | 1. Import Web Components' polyfill: 23 | 24 | ```html 25 | 26 | ``` 27 | 28 | 2. Import Custom Element: 29 | 30 | ```html 31 | 32 | ``` 33 | 34 | 3. Start using it! 35 | 36 | ```html 37 | 43 | 44 | 45 | ``` 46 | 47 | or using javascript: 48 | 49 | ```javascript 50 | var gmap = document.querySelector('google-map'); 51 | gmap.addEventListener('google-map-ready', function(e) { 52 | document.querySelector('google-map-markerclusterer').map = this.map; 53 | }); 54 | ``` 55 | 56 | 57 | ## Options 58 | 59 | See the [component page](http://timeu.github.io/google-map-markerclusterer) for more information. 60 | 61 | 62 | ## Custom markers 63 | 64 | Instead of the default markers `` also custom markers can be used by implementing the behavior: `Markerclusterer.GoogleMapOverlayViewMarkerBehavior` 65 | 66 | ## Custom cluster markers 67 | 68 | There are 2 ways to have custom cluster markers: 69 | 70 | ### Using the styles attribute 71 | 72 | Pass an array of objects to the styles property of the ``: 73 | 74 | ```Javascript 75 | var styles = [{ 76 | url: 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/conv30.png', 77 | width: "30px", 78 | height: "27px", 79 | anchorText: ["-3px", "0px"], 80 | anchorIcon: ["27px", "28px"], 81 | textColor: '#ff00ff', 82 | textSize: "10px" 83 | }, { 84 | url: 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/conv40.png', 85 | width: "40px", 86 | height: "36px", 87 | anchorText: ["-4px", "0px"], 88 | anchorIcon: ["36px", "37px"], 89 | textColor: '#ff0000', 90 | textSize: "11px" 91 | }, { 92 | url: 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/conv50.png', 93 | width: "50px", 94 | height: "45px", 95 | anchorText: ["-5px", "0px"], 96 | anchorIcon: ["45px", "46px"], 97 | textColor: '#0000ff', 98 | textSize: "12px" 99 | }] 100 | ``` 101 | 102 | ```Html 103 | 104 | ``` 105 | or using javascript: 106 | 107 | ```Javascript 108 | var markerclusterer = document.querySelector("google-map-markerclusterer"); 109 | markerclusterer.styles = styles; 110 | ``` 111 | 112 | ## Wrapping a custom element 113 | 114 | If the use-case is more advanced than just what the styles attribute provides, it's possible to specify a custom element as a replacement for the default cluster marker. Create a custom element (i.e ``) that implements the `Markerclusterer.ClusterIconBehavior` behavior and add it to the `google-map-markerclusterer`. 115 | **Important:** Make sure to add a *cluster-icon* classname to your custom cluster icon element. 116 | 117 | 118 | ```Html 119 | 120 | 121 | 122 | ``` 123 | 124 | The various customizations can be viewed on the [demo page](http://timeu.github.io/google-map-markerclusterer/components/google-map-markerclusterer/demo/) page. 125 | 126 | ## Versions & Branches 127 | 128 | | Polymer version | Branch | Release | 129 | | :---- | :---- | :--- | 130 | | 1.x | [1.x](https://github.com/timeu/google-map-markerclusterer/tree/1.x) | 1.x | 131 | | 2.x | [2.x](https://github.com/timeu/google-map-markerclusterer/tree/2.x) | 2.x | 132 | | 3.x | [3.x](https://github.com/timeu/google-map-markerclusterer/tree/3.x) | 3.x | 133 | | lit-element | [master](https://github.com/timeu/google-map-markerclusterer/tree/master) | 4.x| 134 | 135 | ## Contributing 136 | 137 | 1. Fork it! 138 | 2. Create your feature branch: `git checkout -b my-new-feature` 139 | 3. Commit your changes: `git commit -m 'Add some feature'` 140 | 4. Push to the branch: `git push origin my-new-feature` 141 | 5. Submit a pull request :D 142 | 143 | ## History 144 | 145 | Check [Release](https://github.com/timeu/google-map-markerclusterer/releases) list. 146 | 147 | ## License 148 | 149 | [MIT License](http://timeu.mit-license.org/) © Ümit Seren 150 | -------------------------------------------------------------------------------- /analysis.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema_version": "1.0.0", 3 | "elements": [ 4 | { 5 | "description": "The `google-map-markercluster` is an internal element that is used by `google-map-markerclusterer`. By default it wraps a `` element", 6 | "summary": "", 7 | "path": "google-map-markercluster.html", 8 | "properties": [ 9 | { 10 | "name": "center", 11 | "type": "Object | null | undefined", 12 | "description": "The center position of the cluster element (lat,lon)", 13 | "privacy": "public", 14 | "sourceRange": { 15 | "start": { 16 | "line": 47, 17 | "column": 10 18 | }, 19 | "end": { 20 | "line": 51, 21 | "column": 11 22 | } 23 | }, 24 | "metadata": { 25 | "polymer": { 26 | "notify": true, 27 | "attributeType": "Object" 28 | } 29 | }, 30 | "defaultValue": "null" 31 | }, 32 | { 33 | "name": "hidden", 34 | "type": "boolean | null | undefined", 35 | "description": "When set the cluster icon is hidden", 36 | "privacy": "public", 37 | "sourceRange": { 38 | "start": { 39 | "line": 55, 40 | "column": 10 41 | }, 42 | "end": { 43 | "line": 58, 44 | "column": 11 45 | } 46 | }, 47 | "metadata": { 48 | "polymer": { 49 | "attributeType": "Boolean" 50 | } 51 | }, 52 | "defaultValue": "false" 53 | } 54 | ], 55 | "methods": [ 56 | { 57 | "name": "connectedCallback", 58 | "description": "", 59 | "privacy": "public", 60 | "sourceRange": { 61 | "start": { 62 | "line": 62, 63 | "column": 6 64 | }, 65 | "end": { 66 | "line": 66, 67 | "column": 7 68 | } 69 | }, 70 | "metadata": {}, 71 | "params": [], 72 | "return": { 73 | "type": "void" 74 | } 75 | }, 76 | { 77 | "name": "_initClusterSubIcon", 78 | "description": "", 79 | "privacy": "protected", 80 | "sourceRange": { 81 | "start": { 82 | "line": 68, 83 | "column": 6 84 | }, 85 | "end": { 86 | "line": 74, 87 | "column": 7 88 | } 89 | }, 90 | "metadata": {}, 91 | "params": [], 92 | "return": { 93 | "type": "void" 94 | } 95 | }, 96 | { 97 | "name": "disconnectedCallback", 98 | "description": "", 99 | "privacy": "public", 100 | "sourceRange": { 101 | "start": { 102 | "line": 76, 103 | "column": 6 104 | }, 105 | "end": { 106 | "line": 78, 107 | "column": 7 108 | } 109 | }, 110 | "metadata": {}, 111 | "params": [], 112 | "return": { 113 | "type": "void" 114 | } 115 | }, 116 | { 117 | "name": "draw", 118 | "description": "draw callback when the cluster is drawn.", 119 | "privacy": "public", 120 | "sourceRange": { 121 | "start": { 122 | "line": 83, 123 | "column": 6 124 | }, 125 | "end": { 126 | "line": 89, 127 | "column": 7 128 | } 129 | }, 130 | "metadata": {}, 131 | "params": [], 132 | "return": { 133 | "type": "void" 134 | } 135 | }, 136 | { 137 | "name": "_updateIcon", 138 | "description": "Update the icon when a marker is added", 139 | "privacy": "protected", 140 | "sourceRange": { 141 | "start": { 142 | "line": 94, 143 | "column": 6 144 | }, 145 | "end": { 146 | "line": 110, 147 | "column": 7 148 | } 149 | }, 150 | "metadata": {}, 151 | "params": [], 152 | "return": { 153 | "type": "void" 154 | } 155 | }, 156 | { 157 | "name": "_isMarkerAlreadyAdded", 158 | "description": "Check if the marker was already added", 159 | "privacy": "protected", 160 | "sourceRange": { 161 | "start": { 162 | "line": 115, 163 | "column": 6 164 | }, 165 | "end": { 166 | "line": 127, 167 | "column": 7 168 | } 169 | }, 170 | "metadata": {}, 171 | "params": [ 172 | { 173 | "name": "marker" 174 | } 175 | ] 176 | }, 177 | { 178 | "name": "_calculateBounds", 179 | "description": "Calculates the extended bounds that is given by the contained markers.", 180 | "privacy": "protected", 181 | "sourceRange": { 182 | "start": { 183 | "line": 132, 184 | "column": 6 185 | }, 186 | "end": { 187 | "line": 135, 188 | "column": 7 189 | } 190 | }, 191 | "metadata": {}, 192 | "params": [], 193 | "return": { 194 | "type": "void" 195 | } 196 | }, 197 | { 198 | "name": "isMarkerInClusterBounds", 199 | "description": "Check if marker is inside the extended bounds.", 200 | "privacy": "public", 201 | "sourceRange": { 202 | "start": { 203 | "line": 140, 204 | "column": 6 205 | }, 206 | "end": { 207 | "line": 142, 208 | "column": 7 209 | } 210 | }, 211 | "metadata": {}, 212 | "params": [ 213 | { 214 | "name": "marker" 215 | } 216 | ] 217 | }, 218 | { 219 | "name": "_getBounds", 220 | "description": "Calculates the bounds that is given by the contained markers.", 221 | "privacy": "protected", 222 | "sourceRange": { 223 | "start": { 224 | "line": 147, 225 | "column": 6 226 | }, 227 | "end": { 228 | "line": 154, 229 | "column": 7 230 | } 231 | }, 232 | "metadata": {}, 233 | "params": [] 234 | }, 235 | { 236 | "name": "addMarker", 237 | "description": "Adds a marker to the cluster and updates the cluster icon", 238 | "privacy": "public", 239 | "sourceRange": { 240 | "start": { 241 | "line": 159, 242 | "column": 6 243 | }, 244 | "end": { 245 | "line": 204, 246 | "column": 7 247 | } 248 | }, 249 | "metadata": {}, 250 | "params": [ 251 | { 252 | "name": "marker" 253 | } 254 | ] 255 | }, 256 | { 257 | "name": "onRemove", 258 | "description": "onRemove callback when the cluster is removed.\nClears the event listeners.", 259 | "privacy": "public", 260 | "sourceRange": { 261 | "start": { 262 | "line": 210, 263 | "column": 6 264 | }, 265 | "end": { 266 | "line": 221, 267 | "column": 7 268 | } 269 | }, 270 | "metadata": {}, 271 | "params": [], 272 | "return": { 273 | "type": "void" 274 | } 275 | }, 276 | { 277 | "name": "onAdd", 278 | "description": "onAdd callback when the cluster is added.\nEvent listeners for various events are setup.", 279 | "privacy": "public", 280 | "sourceRange": { 281 | "start": { 282 | "line": 227, 283 | "column": 6 284 | }, 285 | "end": { 286 | "line": 278, 287 | "column": 7 288 | } 289 | }, 290 | "metadata": {}, 291 | "params": [], 292 | "return": { 293 | "type": "void" 294 | } 295 | }, 296 | { 297 | "name": "_forwardEvent", 298 | "description": "", 299 | "privacy": "protected", 300 | "sourceRange": { 301 | "start": { 302 | "line": 279, 303 | "column": 6 304 | }, 305 | "end": { 306 | "line": 283, 307 | "column": 7 308 | } 309 | }, 310 | "metadata": {}, 311 | "params": [ 312 | { 313 | "name": "name" 314 | } 315 | ], 316 | "return": { 317 | "type": "void" 318 | } 319 | }, 320 | { 321 | "name": "_clearListener", 322 | "description": "", 323 | "privacy": "protected", 324 | "sourceRange": { 325 | "start": { 326 | "line": 285, 327 | "column": 6 328 | }, 329 | "end": { 330 | "line": 290, 331 | "column": 7 332 | } 333 | }, 334 | "metadata": {}, 335 | "params": [ 336 | { 337 | "name": "name" 338 | } 339 | ], 340 | "return": { 341 | "type": "void" 342 | } 343 | } 344 | ], 345 | "staticMethods": [], 346 | "demos": [], 347 | "metadata": {}, 348 | "sourceRange": { 349 | "start": { 350 | "line": 15, 351 | "column": 4 352 | }, 353 | "end": { 354 | "line": 291, 355 | "column": 5 356 | } 357 | }, 358 | "privacy": "public", 359 | "superclass": "HTMLElement", 360 | "name": "GoogleMapMarkerCluster", 361 | "attributes": [ 362 | { 363 | "name": "center", 364 | "description": "The center position of the cluster element (lat,lon)", 365 | "sourceRange": { 366 | "start": { 367 | "line": 47, 368 | "column": 10 369 | }, 370 | "end": { 371 | "line": 51, 372 | "column": 11 373 | } 374 | }, 375 | "metadata": {}, 376 | "type": "Object | null | undefined" 377 | }, 378 | { 379 | "name": "hidden", 380 | "description": "When set the cluster icon is hidden", 381 | "sourceRange": { 382 | "start": { 383 | "line": 55, 384 | "column": 10 385 | }, 386 | "end": { 387 | "line": 58, 388 | "column": 11 389 | } 390 | }, 391 | "metadata": {}, 392 | "type": "boolean | null | undefined" 393 | } 394 | ], 395 | "events": [ 396 | { 397 | "type": "CustomEvent", 398 | "name": "google-map-markercluster-click", 399 | "description": "Fired when the cluster was clicked.", 400 | "metadata": {} 401 | }, 402 | { 403 | "type": "CustomEvent", 404 | "name": "google-map-markercluster-mouseout", 405 | "description": "Fired when the mouse leaves the area of the cluster.", 406 | "metadata": {} 407 | }, 408 | { 409 | "type": "CustomEvent", 410 | "name": "google-map-markercluster-mouseover", 411 | "description": "Fired when the mouse enters the area of the cluster.", 412 | "metadata": {} 413 | }, 414 | { 415 | "type": "CustomEvent", 416 | "name": "center-changed", 417 | "description": "Fired when the `center` property changes.", 418 | "metadata": {} 419 | } 420 | ], 421 | "styling": { 422 | "cssVariables": [], 423 | "selectors": [] 424 | }, 425 | "slots": [ 426 | { 427 | "description": "", 428 | "name": "", 429 | "range": { 430 | "start": { 431 | "line": 6, 432 | "column": 6 433 | }, 434 | "end": { 435 | "line": 6, 436 | "column": 39 437 | } 438 | } 439 | } 440 | ], 441 | "tagname": "google-map-markercluster" 442 | }, 443 | { 444 | "description": "The `google-map-defaulticon` element is displayed by default when the user does not provide a custom cluster icon.", 445 | "summary": "", 446 | "path": "google-map-defaulticon.html", 447 | "properties": [ 448 | { 449 | "name": "styles", 450 | "type": "Array | null | undefined", 451 | "description": "The list of styles that should be applied to the cluster icon for the various\ncluster levels. If not set, the default styles will be used.\nMust be of object with following keys `{url,width,height,textColor,textSize}`", 452 | "privacy": "public", 453 | "sourceRange": { 454 | "start": { 455 | "line": 84, 456 | "column": 10 457 | }, 458 | "end": { 459 | "line": 87, 460 | "column": 11 461 | } 462 | }, 463 | "metadata": { 464 | "polymer": { 465 | "attributeType": "Array" 466 | } 467 | } 468 | }, 469 | { 470 | "name": "_iconStyle", 471 | "type": "Object | null | undefined", 472 | "description": "The active style for the current cluster level", 473 | "privacy": "protected", 474 | "sourceRange": { 475 | "start": { 476 | "line": 91, 477 | "column": 10 478 | }, 479 | "end": { 480 | "line": 94, 481 | "column": 11 482 | } 483 | }, 484 | "metadata": { 485 | "polymer": { 486 | "attributeType": "Object" 487 | } 488 | }, 489 | "defaultValue": "{}" 490 | } 491 | ], 492 | "methods": [ 493 | { 494 | "name": "_calcActiveStyleIndex", 495 | "description": "Calculates the index of the active style that should be displayed for the current cluster.", 496 | "privacy": "protected", 497 | "sourceRange": { 498 | "start": { 499 | "line": 107, 500 | "column": 6 501 | }, 502 | "end": { 503 | "line": 115, 504 | "column": 7 505 | } 506 | }, 507 | "metadata": {}, 508 | "params": [ 509 | { 510 | "name": "markerLength" 511 | }, 512 | { 513 | "name": "numStyles" 514 | } 515 | ] 516 | }, 517 | { 518 | "name": "_computeText", 519 | "description": "Returns the text that should be displayed", 520 | "privacy": "protected", 521 | "sourceRange": { 522 | "start": { 523 | "line": 120, 524 | "column": 6 525 | }, 526 | "end": { 527 | "line": 122, 528 | "column": 7 529 | } 530 | }, 531 | "metadata": {}, 532 | "params": [ 533 | { 534 | "name": "markers" 535 | } 536 | ] 537 | }, 538 | { 539 | "name": "_updateCustom", 540 | "description": "Observer function that is called when either the `markers` or `styles` is changed.", 541 | "privacy": "protected", 542 | "sourceRange": { 543 | "start": { 544 | "line": 127, 545 | "column": 6 546 | }, 547 | "end": { 548 | "line": 146, 549 | "column": 7 550 | } 551 | }, 552 | "metadata": {}, 553 | "params": [ 554 | { 555 | "name": "markers" 556 | }, 557 | { 558 | "name": "styles" 559 | } 560 | ], 561 | "return": { 562 | "type": "void" 563 | } 564 | } 565 | ], 566 | "staticMethods": [], 567 | "demos": [], 568 | "metadata": {}, 569 | "sourceRange": { 570 | "start": { 571 | "line": 74, 572 | "column": 4 573 | }, 574 | "end": { 575 | "line": 147, 576 | "column": 5 577 | } 578 | }, 579 | "privacy": "public", 580 | "superclass": "HTMLElement", 581 | "name": "GoogleMapDefaultIcon", 582 | "attributes": [ 583 | { 584 | "name": "styles", 585 | "description": "The list of styles that should be applied to the cluster icon for the various\ncluster levels. If not set, the default styles will be used.\nMust be of object with following keys `{url,width,height,textColor,textSize}`", 586 | "sourceRange": { 587 | "start": { 588 | "line": 84, 589 | "column": 10 590 | }, 591 | "end": { 592 | "line": 87, 593 | "column": 11 594 | } 595 | }, 596 | "metadata": {}, 597 | "type": "Array | null | undefined" 598 | } 599 | ], 600 | "events": [], 601 | "styling": { 602 | "cssVariables": [], 603 | "selectors": [] 604 | }, 605 | "slots": [], 606 | "tagname": "google-map-defaulticon" 607 | }, 608 | { 609 | "description": "The `google-map-markerclusterer` element is a port of markercluster-plus to polymer.\nIt helps to cluster markers on a google-map together\n##### Example\n \n\n##### Example - custom cluster marker\n\n \n \n ", 610 | "summary": "", 611 | "path": "google-map-markerclusterer.html", 612 | "properties": [ 613 | { 614 | "name": "markers", 615 | "type": "Array | null | undefined", 616 | "description": "Markers that should be clustered.", 617 | "privacy": "public", 618 | "sourceRange": { 619 | "start": { 620 | "line": 69, 621 | "column": 12 622 | }, 623 | "end": { 624 | "line": 73, 625 | "column": 13 626 | } 627 | }, 628 | "metadata": { 629 | "polymer": { 630 | "observer": "\"_markersChanged\"", 631 | "attributeType": "Array" 632 | } 633 | }, 634 | "defaultValue": "[]" 635 | }, 636 | { 637 | "name": "fitToMarkers", 638 | "type": "boolean | null | undefined", 639 | "description": "If set, the zoom level is set such that all markers (google-map-marker children) are brought into view.", 640 | "privacy": "public", 641 | "sourceRange": { 642 | "start": { 643 | "line": 78, 644 | "column": 12 645 | }, 646 | "end": { 647 | "line": 82, 648 | "column": 13 649 | } 650 | }, 651 | "metadata": { 652 | "polymer": { 653 | "observer": "\"_fitToMarkersChanged\"", 654 | "attributeType": "Boolean" 655 | } 656 | }, 657 | "defaultValue": "false" 658 | }, 659 | { 660 | "name": "batchSize", 661 | "type": "number | null | undefined", 662 | "description": "BatchSize specifies the amount of markers that should be processed per run.", 663 | "privacy": "public", 664 | "sourceRange": { 665 | "start": { 666 | "line": 87, 667 | "column": 12 668 | }, 669 | "end": { 670 | "line": 90, 671 | "column": 13 672 | } 673 | }, 674 | "metadata": { 675 | "polymer": { 676 | "attributeType": "Number" 677 | } 678 | }, 679 | "defaultValue": "2000" 680 | }, 681 | { 682 | "name": "ignoreHidden", 683 | "type": "boolean | null | undefined", 684 | "description": "If set ignores hidden markers when creating the clusters.", 685 | "privacy": "public", 686 | "sourceRange": { 687 | "start": { 688 | "line": 95, 689 | "column": 12 690 | }, 691 | "end": { 692 | "line": 98, 693 | "column": 13 694 | } 695 | }, 696 | "metadata": { 697 | "polymer": { 698 | "attributeType": "Boolean" 699 | } 700 | }, 701 | "defaultValue": "false" 702 | }, 703 | { 704 | "name": "gridSize", 705 | "type": "number | null | undefined", 706 | "description": "Specifies the size of the grid for each cluster in pixel.", 707 | "privacy": "public", 708 | "sourceRange": { 709 | "start": { 710 | "line": 103, 711 | "column": 12 712 | }, 713 | "end": { 714 | "line": 106, 715 | "column": 13 716 | } 717 | }, 718 | "metadata": { 719 | "polymer": { 720 | "attributeType": "Number" 721 | } 722 | }, 723 | "defaultValue": "60" 724 | }, 725 | { 726 | "name": "minimumClusterSize", 727 | "type": "number | null | undefined", 728 | "description": "Sepcifies the minimum number of markers to be clustered.", 729 | "privacy": "public", 730 | "sourceRange": { 731 | "start": { 732 | "line": 111, 733 | "column": 12 734 | }, 735 | "end": { 736 | "line": 114, 737 | "column": 13 738 | } 739 | }, 740 | "metadata": { 741 | "polymer": { 742 | "attributeType": "Number" 743 | } 744 | }, 745 | "defaultValue": "2" 746 | }, 747 | { 748 | "name": "averageCenter", 749 | "type": "boolean | null | undefined", 750 | "description": "If set, the center of the cluster is set to the average of all locations of its containing markers.\nOtherwise the cluster center will be the one of the first marker added to it.", 751 | "privacy": "public", 752 | "sourceRange": { 753 | "start": { 754 | "line": 120, 755 | "column": 12 756 | }, 757 | "end": { 758 | "line": 123, 759 | "column": 13 760 | } 761 | }, 762 | "metadata": { 763 | "polymer": { 764 | "attributeType": "Boolean" 765 | } 766 | }, 767 | "defaultValue": "false" 768 | }, 769 | { 770 | "name": "maxZoom", 771 | "type": "number | null | undefined", 772 | "description": "Specifies the maximum zoom at which individual markers are shown.\nBy default no maxZoom is set.", 773 | "privacy": "public", 774 | "sourceRange": { 775 | "start": { 776 | "line": 129, 777 | "column": 12 778 | }, 779 | "end": { 780 | "line": 132, 781 | "column": 13 782 | } 783 | }, 784 | "metadata": { 785 | "polymer": { 786 | "attributeType": "Number" 787 | } 788 | }, 789 | "defaultValue": "null" 790 | }, 791 | { 792 | "name": "zoomOnClick", 793 | "type": "boolean | null | undefined", 794 | "description": "If set, the map is zoomed far enough that all markers of the cluster fit inside the viewport (Default: true).", 795 | "privacy": "public", 796 | "sourceRange": { 797 | "start": { 798 | "line": 137, 799 | "column": 12 800 | }, 801 | "end": { 802 | "line": 140, 803 | "column": 13 804 | } 805 | }, 806 | "metadata": { 807 | "polymer": { 808 | "attributeType": "Boolean" 809 | } 810 | }, 811 | "defaultValue": "true" 812 | }, 813 | { 814 | "name": "styles", 815 | "type": "Array | null | undefined", 816 | "description": "Styles for the google-map-defaulticon element.", 817 | "privacy": "public", 818 | "sourceRange": { 819 | "start": { 820 | "line": 144, 821 | "column": 12 822 | }, 823 | "end": { 824 | "line": 148, 825 | "column": 13 826 | } 827 | }, 828 | "metadata": { 829 | "polymer": { 830 | "observer": "\"_changeStyles\"", 831 | "attributeType": "Array" 832 | } 833 | }, 834 | "defaultValue": "null" 835 | } 836 | ], 837 | "methods": [ 838 | { 839 | "name": "connectedCallback", 840 | "description": "", 841 | "privacy": "public", 842 | "sourceRange": { 843 | "start": { 844 | "line": 167, 845 | "column": 8 846 | }, 847 | "end": { 848 | "line": 171, 849 | "column": 9 850 | } 851 | }, 852 | "metadata": {}, 853 | "params": [], 854 | "return": { 855 | "type": "void" 856 | } 857 | }, 858 | { 859 | "name": "_initClusterIconTemplate", 860 | "description": "", 861 | "privacy": "protected", 862 | "sourceRange": { 863 | "start": { 864 | "line": 173, 865 | "column": 8 866 | }, 867 | "end": { 868 | "line": 183, 869 | "column": 9 870 | } 871 | }, 872 | "metadata": {}, 873 | "params": [], 874 | "return": { 875 | "type": "void" 876 | } 877 | }, 878 | { 879 | "name": "_distanceBetweenPoints", 880 | "description": "Calculates the distance between two latlng locations in km.", 881 | "privacy": "protected", 882 | "sourceRange": { 883 | "start": { 884 | "line": 193, 885 | "column": 8 886 | }, 887 | "end": { 888 | "line": 203, 889 | "column": 9 890 | } 891 | }, 892 | "metadata": {}, 893 | "params": [ 894 | { 895 | "name": "p1", 896 | "type": "google.maps.LatLng", 897 | "description": "The first lat lng point." 898 | }, 899 | { 900 | "name": "p2", 901 | "type": "google.maps.LatLng", 902 | "description": "The second lat lng point." 903 | } 904 | ], 905 | "return": { 906 | "type": "number", 907 | "desc": "The distance between the two points in km." 908 | } 909 | }, 910 | { 911 | "name": "_isMarkerInBounds", 912 | "description": "Returns if the marker is inside the specified bounds", 913 | "privacy": "protected", 914 | "sourceRange": { 915 | "start": { 916 | "line": 208, 917 | "column": 8 918 | }, 919 | "end": { 920 | "line": 210, 921 | "column": 9 922 | } 923 | }, 924 | "metadata": {}, 925 | "params": [ 926 | { 927 | "name": "marker" 928 | }, 929 | { 930 | "name": "bounds" 931 | } 932 | ] 933 | }, 934 | { 935 | "name": "onAdd", 936 | "description": "Called when the markerclusterer is added to the map.\nEvents are initialized.", 937 | "privacy": "public", 938 | "sourceRange": { 939 | "start": { 940 | "line": 216, 941 | "column": 8 942 | }, 943 | "end": { 944 | "line": 238, 945 | "column": 9 946 | } 947 | }, 948 | "metadata": {}, 949 | "params": [], 950 | "return": { 951 | "type": "void" 952 | } 953 | }, 954 | { 955 | "name": "_addToClosestCluster", 956 | "description": "Adds a marker to a cluster, or creates a new cluster.", 957 | "privacy": "protected", 958 | "sourceRange": { 959 | "start": { 960 | "line": 243, 961 | "column": 8 962 | }, 963 | "end": { 964 | "line": 282, 965 | "column": 9 966 | } 967 | }, 968 | "metadata": {}, 969 | "params": [ 970 | { 971 | "name": "marker" 972 | } 973 | ], 974 | "return": { 975 | "type": "void" 976 | } 977 | }, 978 | { 979 | "name": "_computeClusters", 980 | "description": "Creates the clusters. This is done in batches to avoid timeout errors\n in some browsers when there is a huge number of markers.", 981 | "privacy": "protected", 982 | "sourceRange": { 983 | "start": { 984 | "line": 291, 985 | "column": 8 986 | }, 987 | "end": { 988 | "line": 340, 989 | "column": 9 990 | } 991 | }, 992 | "metadata": {}, 993 | "params": [ 994 | { 995 | "name": "iFirst", 996 | "type": "number", 997 | "description": "The index of the first marker in the batch of\n markers to be added to clusters." 998 | } 999 | ], 1000 | "return": { 1001 | "type": "void" 1002 | } 1003 | }, 1004 | { 1005 | "name": "onRemove", 1006 | "description": "Callback that is called when the markerclusterer is removed from the map.\nThis will put all clustered markers back on the map", 1007 | "privacy": "public", 1008 | "sourceRange": { 1009 | "start": { 1010 | "line": 346, 1011 | "column": 8 1012 | }, 1013 | "end": { 1014 | "line": 353, 1015 | "column": 9 1016 | } 1017 | }, 1018 | "metadata": {}, 1019 | "params": [], 1020 | "return": { 1021 | "type": "void" 1022 | } 1023 | }, 1024 | { 1025 | "name": "_fitToMarkersChanged", 1026 | "description": "Observer function that is called when `fitToMarkers` is changed.", 1027 | "privacy": "protected", 1028 | "sourceRange": { 1029 | "start": { 1030 | "line": 358, 1031 | "column": 8 1032 | }, 1033 | "end": { 1034 | "line": 373, 1035 | "column": 9 1036 | } 1037 | }, 1038 | "metadata": {}, 1039 | "params": [], 1040 | "return": { 1041 | "type": "void" 1042 | } 1043 | }, 1044 | { 1045 | "name": "_optionChanged", 1046 | "description": "Observer function that is called if one of the options is changed.\nDebounce calls to `repaint`", 1047 | "privacy": "protected", 1048 | "sourceRange": { 1049 | "start": { 1050 | "line": 379, 1051 | "column": 8 1052 | }, 1053 | "end": { 1054 | "line": 381, 1055 | "column": 9 1056 | } 1057 | }, 1058 | "metadata": {}, 1059 | "params": [ 1060 | { 1061 | "name": "markers" 1062 | }, 1063 | { 1064 | "name": "gridSize" 1065 | }, 1066 | { 1067 | "name": "averageCenter" 1068 | }, 1069 | { 1070 | "name": "minimumClusterSize" 1071 | }, 1072 | { 1073 | "name": "maxZoom" 1074 | } 1075 | ], 1076 | "return": { 1077 | "type": "void" 1078 | } 1079 | }, 1080 | { 1081 | "name": "repaint", 1082 | "description": "Repaint will re-create and re-draw the clusters.", 1083 | "privacy": "public", 1084 | "sourceRange": { 1085 | "start": { 1086 | "line": 386, 1087 | "column": 9 1088 | }, 1089 | "end": { 1090 | "line": 389, 1091 | "column": 9 1092 | } 1093 | }, 1094 | "metadata": {}, 1095 | "params": [], 1096 | "return": { 1097 | "type": "void" 1098 | } 1099 | }, 1100 | { 1101 | "name": "_resetClusters", 1102 | "description": "Removes the clusters and resets the markers.", 1103 | "privacy": "protected", 1104 | "sourceRange": { 1105 | "start": { 1106 | "line": 394, 1107 | "column": 8 1108 | }, 1109 | "end": { 1110 | "line": 401, 1111 | "column": 9 1112 | } 1113 | }, 1114 | "metadata": {}, 1115 | "params": [], 1116 | "return": { 1117 | "type": "void" 1118 | } 1119 | }, 1120 | { 1121 | "name": "_initMarkers", 1122 | "description": "Initializes the markers and setups dragend event if markers is draggable.", 1123 | "privacy": "protected", 1124 | "sourceRange": { 1125 | "start": { 1126 | "line": 406, 1127 | "column": 8 1128 | }, 1129 | "end": { 1130 | "line": 421, 1131 | "column": 9 1132 | } 1133 | }, 1134 | "metadata": {}, 1135 | "params": [ 1136 | { 1137 | "name": "markers" 1138 | } 1139 | ], 1140 | "return": { 1141 | "type": "void" 1142 | } 1143 | }, 1144 | { 1145 | "name": "_resetMarkers", 1146 | "description": "this will reset the marker.", 1147 | "privacy": "protected", 1148 | "sourceRange": { 1149 | "start": { 1150 | "line": 428, 1151 | "column": 8 1152 | }, 1153 | "end": { 1154 | "line": 439, 1155 | "column": 9 1156 | } 1157 | }, 1158 | "metadata": {}, 1159 | "params": [ 1160 | { 1161 | "name": "optHide" 1162 | }, 1163 | { 1164 | "name": "markers", 1165 | "type": "Array", 1166 | "description": "the markers that should be reset" 1167 | } 1168 | ], 1169 | "return": { 1170 | "type": "void" 1171 | } 1172 | }, 1173 | { 1174 | "name": "_markersChanged", 1175 | "description": "Observer function that is called when the `markers` Array is changed.\nWill reset the current markers and debounce call to `repaint`", 1176 | "privacy": "protected", 1177 | "sourceRange": { 1178 | "start": { 1179 | "line": 444, 1180 | "column": 8 1181 | }, 1182 | "end": { 1183 | "line": 451, 1184 | "column": 9 1185 | } 1186 | }, 1187 | "metadata": {}, 1188 | "params": [ 1189 | { 1190 | "name": "newMarkers" 1191 | }, 1192 | { 1193 | "name": "oldMarkers" 1194 | } 1195 | ], 1196 | "return": { 1197 | "type": "void" 1198 | } 1199 | }, 1200 | { 1201 | "name": "_changeStyles", 1202 | "description": "Observer function that is called when the styles are changed.\nOnly used when the `google-map-defaulticon` is used.", 1203 | "privacy": "protected", 1204 | "sourceRange": { 1205 | "start": { 1206 | "line": 457, 1207 | "column": 8 1208 | }, 1209 | "end": { 1210 | "line": 468, 1211 | "column": 9 1212 | } 1213 | }, 1214 | "metadata": {}, 1215 | "params": [ 1216 | { 1217 | "name": "styles" 1218 | } 1219 | ], 1220 | "return": { 1221 | "type": "void" 1222 | } 1223 | } 1224 | ], 1225 | "staticMethods": [], 1226 | "demos": [ 1227 | { 1228 | "url": "demo/index.html", 1229 | "description": "" 1230 | }, 1231 | { 1232 | "url": "demo/simple.html", 1233 | "description": "" 1234 | } 1235 | ], 1236 | "metadata": {}, 1237 | "sourceRange": { 1238 | "start": { 1239 | "line": 33, 1240 | "column": 6 1241 | }, 1242 | "end": { 1243 | "line": 469, 1244 | "column": 7 1245 | } 1246 | }, 1247 | "privacy": "public", 1248 | "superclass": "HTMLElement", 1249 | "name": "GoogleMapMarkerclusterer", 1250 | "attributes": [ 1251 | { 1252 | "name": "markers", 1253 | "description": "Markers that should be clustered.", 1254 | "sourceRange": { 1255 | "start": { 1256 | "line": 69, 1257 | "column": 12 1258 | }, 1259 | "end": { 1260 | "line": 73, 1261 | "column": 13 1262 | } 1263 | }, 1264 | "metadata": {}, 1265 | "type": "Array | null | undefined" 1266 | }, 1267 | { 1268 | "name": "fit-to-markers", 1269 | "description": "If set, the zoom level is set such that all markers (google-map-marker children) are brought into view.", 1270 | "sourceRange": { 1271 | "start": { 1272 | "line": 78, 1273 | "column": 12 1274 | }, 1275 | "end": { 1276 | "line": 82, 1277 | "column": 13 1278 | } 1279 | }, 1280 | "metadata": {}, 1281 | "type": "boolean | null | undefined" 1282 | }, 1283 | { 1284 | "name": "batch-size", 1285 | "description": "BatchSize specifies the amount of markers that should be processed per run.", 1286 | "sourceRange": { 1287 | "start": { 1288 | "line": 87, 1289 | "column": 12 1290 | }, 1291 | "end": { 1292 | "line": 90, 1293 | "column": 13 1294 | } 1295 | }, 1296 | "metadata": {}, 1297 | "type": "number | null | undefined" 1298 | }, 1299 | { 1300 | "name": "ignore-hidden", 1301 | "description": "If set ignores hidden markers when creating the clusters.", 1302 | "sourceRange": { 1303 | "start": { 1304 | "line": 95, 1305 | "column": 12 1306 | }, 1307 | "end": { 1308 | "line": 98, 1309 | "column": 13 1310 | } 1311 | }, 1312 | "metadata": {}, 1313 | "type": "boolean | null | undefined" 1314 | }, 1315 | { 1316 | "name": "grid-size", 1317 | "description": "Specifies the size of the grid for each cluster in pixel.", 1318 | "sourceRange": { 1319 | "start": { 1320 | "line": 103, 1321 | "column": 12 1322 | }, 1323 | "end": { 1324 | "line": 106, 1325 | "column": 13 1326 | } 1327 | }, 1328 | "metadata": {}, 1329 | "type": "number | null | undefined" 1330 | }, 1331 | { 1332 | "name": "minimum-cluster-size", 1333 | "description": "Sepcifies the minimum number of markers to be clustered.", 1334 | "sourceRange": { 1335 | "start": { 1336 | "line": 111, 1337 | "column": 12 1338 | }, 1339 | "end": { 1340 | "line": 114, 1341 | "column": 13 1342 | } 1343 | }, 1344 | "metadata": {}, 1345 | "type": "number | null | undefined" 1346 | }, 1347 | { 1348 | "name": "average-center", 1349 | "description": "If set, the center of the cluster is set to the average of all locations of its containing markers.\nOtherwise the cluster center will be the one of the first marker added to it.", 1350 | "sourceRange": { 1351 | "start": { 1352 | "line": 120, 1353 | "column": 12 1354 | }, 1355 | "end": { 1356 | "line": 123, 1357 | "column": 13 1358 | } 1359 | }, 1360 | "metadata": {}, 1361 | "type": "boolean | null | undefined" 1362 | }, 1363 | { 1364 | "name": "max-zoom", 1365 | "description": "Specifies the maximum zoom at which individual markers are shown.\nBy default no maxZoom is set.", 1366 | "sourceRange": { 1367 | "start": { 1368 | "line": 129, 1369 | "column": 12 1370 | }, 1371 | "end": { 1372 | "line": 132, 1373 | "column": 13 1374 | } 1375 | }, 1376 | "metadata": {}, 1377 | "type": "number | null | undefined" 1378 | }, 1379 | { 1380 | "name": "zoom-on-click", 1381 | "description": "If set, the map is zoomed far enough that all markers of the cluster fit inside the viewport (Default: true).", 1382 | "sourceRange": { 1383 | "start": { 1384 | "line": 137, 1385 | "column": 12 1386 | }, 1387 | "end": { 1388 | "line": 140, 1389 | "column": 13 1390 | } 1391 | }, 1392 | "metadata": {}, 1393 | "type": "boolean | null | undefined" 1394 | }, 1395 | { 1396 | "name": "styles", 1397 | "description": "Styles for the google-map-defaulticon element.", 1398 | "sourceRange": { 1399 | "start": { 1400 | "line": 144, 1401 | "column": 12 1402 | }, 1403 | "end": { 1404 | "line": 148, 1405 | "column": 13 1406 | } 1407 | }, 1408 | "metadata": {}, 1409 | "type": "Array | null | undefined" 1410 | } 1411 | ], 1412 | "events": [ 1413 | { 1414 | "type": "CustomEvent", 1415 | "name": "google-map-markercluster-click", 1416 | "description": "Fired when the cluster was clicked.", 1417 | "metadata": {} 1418 | }, 1419 | { 1420 | "type": "CustomEvent", 1421 | "name": "google-map-markercluster-clustering-end", 1422 | "description": "Fired when the clustering of the markers ends.", 1423 | "metadata": {} 1424 | }, 1425 | { 1426 | "type": "CustomEvent", 1427 | "name": "google-map-markercluster-clustering-start", 1428 | "description": "Fired when the clustering of the markers starts.", 1429 | "metadata": {} 1430 | }, 1431 | { 1432 | "type": "CustomEvent", 1433 | "name": "google-map-markercluster-mouseout", 1434 | "description": "Fired when the mouse leaves the area of the cluster.", 1435 | "metadata": {} 1436 | }, 1437 | { 1438 | "type": "CustomEvent", 1439 | "name": "google-map-markercluster-mouseover", 1440 | "description": "Fired when the mouse enters the area of the cluster.", 1441 | "metadata": {} 1442 | } 1443 | ], 1444 | "styling": { 1445 | "cssVariables": [], 1446 | "selectors": [] 1447 | }, 1448 | "slots": [ 1449 | { 1450 | "description": "", 1451 | "name": "cluster-icon", 1452 | "range": { 1453 | "start": { 1454 | "line": 8, 1455 | "column": 11 1456 | }, 1457 | "end": { 1458 | "line": 8, 1459 | "column": 69 1460 | } 1461 | } 1462 | } 1463 | ], 1464 | "tagname": "google-map-markerclusterer" 1465 | }, 1466 | { 1467 | "description": "The `google-map-overlayview` element is a generic overlay container element.\nIt maps to the OverlayView of google maps v3.\nExample:\n \n\nFor example to embed a simple `` element into a overlay use this code:\n\n \n\nIt is also possible to embed another `custom element` inside a ``", 1468 | "summary": "", 1469 | "path": "google-map-overlayview.html", 1470 | "properties": [], 1471 | "methods": [], 1472 | "staticMethods": [], 1473 | "demos": [], 1474 | "metadata": {}, 1475 | "sourceRange": { 1476 | "start": { 1477 | "line": 24, 1478 | "column": 4 1479 | }, 1480 | "end": { 1481 | "line": 26, 1482 | "column": 5 1483 | } 1484 | }, 1485 | "privacy": "public", 1486 | "superclass": "HTMLElement", 1487 | "name": "GoogleMapOverlayView", 1488 | "attributes": [], 1489 | "events": [], 1490 | "styling": { 1491 | "cssVariables": [], 1492 | "selectors": [] 1493 | }, 1494 | "slots": [ 1495 | { 1496 | "description": "", 1497 | "name": "", 1498 | "range": { 1499 | "start": { 1500 | "line": 6, 1501 | "column": 8 1502 | }, 1503 | "end": { 1504 | "line": 6, 1505 | "column": 41 1506 | } 1507 | } 1508 | } 1509 | ], 1510 | "tagname": "google-map-overlayview" 1511 | } 1512 | ], 1513 | "mixins": [ 1514 | { 1515 | "description": "Use `GoogleMapOverlayViewBehavior` to implement elements that should be displayed on a `google-map` using an overlayview", 1516 | "summary": "", 1517 | "path": "google-map-overlayview-behavior.html", 1518 | "properties": [ 1519 | { 1520 | "name": "map", 1521 | "type": "Object | null | undefined", 1522 | "description": "A Maps API object.", 1523 | "privacy": "public", 1524 | "sourceRange": { 1525 | "start": { 1526 | "line": 13, 1527 | "column": 10 1528 | }, 1529 | "end": { 1530 | "line": 17, 1531 | "column": 11 1532 | } 1533 | }, 1534 | "metadata": { 1535 | "polymer": { 1536 | "observer": "\"_mapChanged\"", 1537 | "attributeType": "Object" 1538 | } 1539 | }, 1540 | "defaultValue": "null" 1541 | }, 1542 | { 1543 | "name": "visible", 1544 | "type": "boolean | null | undefined", 1545 | "description": "A boolean flag to set the visiblity", 1546 | "privacy": "public", 1547 | "sourceRange": { 1548 | "start": { 1549 | "line": 22, 1550 | "column": 10 1551 | }, 1552 | "end": { 1553 | "line": 25, 1554 | "column": 11 1555 | } 1556 | }, 1557 | "metadata": { 1558 | "polymer": { 1559 | "attributeType": "Boolean" 1560 | } 1561 | }, 1562 | "defaultValue": "true" 1563 | } 1564 | ], 1565 | "methods": [ 1566 | { 1567 | "name": "ready", 1568 | "description": "", 1569 | "privacy": "protected", 1570 | "sourceRange": { 1571 | "start": { 1572 | "line": 29, 1573 | "column": 6 1574 | }, 1575 | "end": { 1576 | "line": 32, 1577 | "column": 7 1578 | } 1579 | }, 1580 | "metadata": {}, 1581 | "params": [], 1582 | "return": { 1583 | "type": "void" 1584 | } 1585 | }, 1586 | { 1587 | "name": "_initOverlay", 1588 | "description": "Initializes the overlay if the Google Maps API was properly loaded.\nSets the callbacks (onAdd, draw and onRemove) to the current instance", 1589 | "privacy": "protected", 1590 | "sourceRange": { 1591 | "start": { 1592 | "line": 37, 1593 | "column": 6 1594 | }, 1595 | "end": { 1596 | "line": 48, 1597 | "column": 7 1598 | } 1599 | }, 1600 | "metadata": {}, 1601 | "params": [], 1602 | "return": { 1603 | "type": "void" 1604 | } 1605 | }, 1606 | { 1607 | "name": "_overlayView", 1608 | "description": "OverlayView object constructor.", 1609 | "privacy": "protected", 1610 | "sourceRange": { 1611 | "start": { 1612 | "line": 52, 1613 | "column": 6 1614 | }, 1615 | "end": { 1616 | "line": 56, 1617 | "column": 7 1618 | } 1619 | }, 1620 | "metadata": {}, 1621 | "params": [ 1622 | { 1623 | "name": "map" 1624 | } 1625 | ], 1626 | "return": { 1627 | "type": "void" 1628 | } 1629 | }, 1630 | { 1631 | "name": "_mapChanged", 1632 | "description": "Callback when the map is changed. By default this will call `setMap` on the `OverlayView`", 1633 | "privacy": "protected", 1634 | "sourceRange": { 1635 | "start": { 1636 | "line": 61, 1637 | "column": 6 1638 | }, 1639 | "end": { 1640 | "line": 66, 1641 | "column": 7 1642 | } 1643 | }, 1644 | "metadata": {}, 1645 | "params": [ 1646 | { 1647 | "name": "map" 1648 | } 1649 | ], 1650 | "return": { 1651 | "type": "void" 1652 | } 1653 | }, 1654 | { 1655 | "name": "draw", 1656 | "description": "draw callback when the overlayview is drawn", 1657 | "privacy": "public", 1658 | "sourceRange": { 1659 | "start": { 1660 | "line": 71, 1661 | "column": 6 1662 | }, 1663 | "end": { 1664 | "line": 71, 1665 | "column": 15 1666 | } 1667 | }, 1668 | "metadata": {}, 1669 | "params": [], 1670 | "return": { 1671 | "type": "void" 1672 | } 1673 | }, 1674 | { 1675 | "name": "onAdd", 1676 | "description": "onAdd callback when the overlayview is added to the map.", 1677 | "privacy": "public", 1678 | "sourceRange": { 1679 | "start": { 1680 | "line": 76, 1681 | "column": 6 1682 | }, 1683 | "end": { 1684 | "line": 79, 1685 | "column": 7 1686 | } 1687 | }, 1688 | "metadata": {}, 1689 | "params": [], 1690 | "return": { 1691 | "type": "void" 1692 | } 1693 | }, 1694 | { 1695 | "name": "onRemove", 1696 | "description": "onRemove callback when the overlayview is removed from the map.", 1697 | "privacy": "public", 1698 | "sourceRange": { 1699 | "start": { 1700 | "line": 84, 1701 | "column": 6 1702 | }, 1703 | "end": { 1704 | "line": 86, 1705 | "column": 7 1706 | } 1707 | }, 1708 | "metadata": {}, 1709 | "params": [], 1710 | "return": { 1711 | "type": "void" 1712 | } 1713 | }, 1714 | { 1715 | "name": "getPosFromLatLng", 1716 | "description": "Returns the position at which to place the DIV depending on the latlng.", 1717 | "privacy": "public", 1718 | "sourceRange": { 1719 | "start": { 1720 | "line": 94, 1721 | "column": 6 1722 | }, 1723 | "end": { 1724 | "line": 99, 1725 | "column": 9 1726 | } 1727 | }, 1728 | "metadata": {}, 1729 | "params": [ 1730 | { 1731 | "name": "latlng", 1732 | "type": "google.maps.LatLng", 1733 | "description": "The position in latlng." 1734 | } 1735 | ], 1736 | "return": { 1737 | "type": "google.maps.Point", 1738 | "desc": "The position in pixels." 1739 | } 1740 | }, 1741 | { 1742 | "name": "getExtendedBounds", 1743 | "description": "Returns the current bounds extended by the grid size.", 1744 | "privacy": "public", 1745 | "sourceRange": { 1746 | "start": { 1747 | "line": 106, 1748 | "column": 6 1749 | }, 1750 | "end": { 1751 | "line": 133, 1752 | "column": 7 1753 | } 1754 | }, 1755 | "metadata": {}, 1756 | "params": [ 1757 | { 1758 | "name": "bounds", 1759 | "type": "google.maps.LatLngBounds", 1760 | "description": "The bounds to extend." 1761 | }, 1762 | { 1763 | "name": "size" 1764 | } 1765 | ], 1766 | "return": { 1767 | "type": "google.maps.LatLngBounds", 1768 | "desc": "The extended bounds." 1769 | } 1770 | } 1771 | ], 1772 | "staticMethods": [], 1773 | "demos": [], 1774 | "metadata": {}, 1775 | "sourceRange": { 1776 | "start": { 1777 | "line": 6, 1778 | "column": 2 1779 | }, 1780 | "end": { 1781 | "line": 135, 1782 | "column": 3 1783 | } 1784 | }, 1785 | "privacy": "public", 1786 | "name": "GoogleMapOverlayViewBehavior", 1787 | "attributes": [ 1788 | { 1789 | "name": "map", 1790 | "description": "A Maps API object.", 1791 | "sourceRange": { 1792 | "start": { 1793 | "line": 13, 1794 | "column": 10 1795 | }, 1796 | "end": { 1797 | "line": 17, 1798 | "column": 11 1799 | } 1800 | }, 1801 | "metadata": {}, 1802 | "type": "Object | null | undefined" 1803 | }, 1804 | { 1805 | "name": "visible", 1806 | "description": "A boolean flag to set the visiblity", 1807 | "sourceRange": { 1808 | "start": { 1809 | "line": 22, 1810 | "column": 10 1811 | }, 1812 | "end": { 1813 | "line": 25, 1814 | "column": 11 1815 | } 1816 | }, 1817 | "metadata": {}, 1818 | "type": "boolean | null | undefined" 1819 | } 1820 | ], 1821 | "events": [], 1822 | "styling": { 1823 | "cssVariables": [], 1824 | "selectors": [] 1825 | }, 1826 | "slots": [] 1827 | }, 1828 | { 1829 | "description": "Use `ClusterIconBehavior` to implement elements that should display a custom cluster icon.\nUsers should implement the `updateMarkers` function if they need to customize based on the markers that are contained * in the cluster.", 1830 | "summary": "", 1831 | "path": "google-map-markercluster-icon-behavior.html", 1832 | "properties": [ 1833 | { 1834 | "name": "markers", 1835 | "type": "Array | null | undefined", 1836 | "description": "The markers that are contained in the cluster.", 1837 | "privacy": "public", 1838 | "sourceRange": { 1839 | "start": { 1840 | "line": 14, 1841 | "column": 10 1842 | }, 1843 | "end": { 1844 | "line": 17, 1845 | "column": 11 1846 | } 1847 | }, 1848 | "metadata": { 1849 | "polymer": { 1850 | "observer": "\"updateMarkers\"", 1851 | "attributeType": "Array" 1852 | } 1853 | } 1854 | } 1855 | ], 1856 | "methods": [ 1857 | { 1858 | "name": "updateMarkers", 1859 | "description": "Observer function that is called when the `markers` Array is changed.", 1860 | "privacy": "public", 1861 | "sourceRange": { 1862 | "start": { 1863 | "line": 23, 1864 | "column": 6 1865 | }, 1866 | "end": { 1867 | "line": 25, 1868 | "column": 7 1869 | } 1870 | }, 1871 | "metadata": {}, 1872 | "params": [ 1873 | { 1874 | "name": "markers" 1875 | } 1876 | ], 1877 | "return": { 1878 | "type": "void" 1879 | } 1880 | } 1881 | ], 1882 | "staticMethods": [], 1883 | "demos": [], 1884 | "metadata": {}, 1885 | "sourceRange": { 1886 | "start": { 1887 | "line": 7, 1888 | "column": 2 1889 | }, 1890 | "end": { 1891 | "line": 27, 1892 | "column": 3 1893 | } 1894 | }, 1895 | "privacy": "public", 1896 | "name": "ClusterIconBehavior", 1897 | "attributes": [ 1898 | { 1899 | "name": "markers", 1900 | "description": "The markers that are contained in the cluster.", 1901 | "sourceRange": { 1902 | "start": { 1903 | "line": 14, 1904 | "column": 10 1905 | }, 1906 | "end": { 1907 | "line": 17, 1908 | "column": 11 1909 | } 1910 | }, 1911 | "metadata": {}, 1912 | "type": "Array | null | undefined" 1913 | } 1914 | ], 1915 | "events": [], 1916 | "styling": { 1917 | "cssVariables": [], 1918 | "selectors": [] 1919 | }, 1920 | "slots": [] 1921 | }, 1922 | { 1923 | "description": "Use `GoogleMapOverlayViewMarkerBehavior` to implement elements that should be displayed as `Marker` on a `google-map` using an overlayview\nUsers should either override the `_update` if they need to customize the positioning.", 1924 | "summary": "", 1925 | "path": "google-map-overlayview-marker-behavior.html", 1926 | "properties": [ 1927 | { 1928 | "name": "position", 1929 | "type": "Object | null | undefined", 1930 | "description": "The position of the marker on the map", 1931 | "privacy": "public", 1932 | "sourceRange": { 1933 | "start": { 1934 | "line": 16, 1935 | "column": 5 1936 | }, 1937 | "end": { 1938 | "line": 19, 1939 | "column": 6 1940 | } 1941 | }, 1942 | "metadata": { 1943 | "polymer": { 1944 | "attributeType": "Object" 1945 | } 1946 | }, 1947 | "defaultValue": "null" 1948 | }, 1949 | { 1950 | "name": "size", 1951 | "type": "number | null | undefined", 1952 | "description": "The size of the marker", 1953 | "privacy": "public", 1954 | "sourceRange": { 1955 | "start": { 1956 | "line": 23, 1957 | "column": 5 1958 | }, 1959 | "end": { 1960 | "line": 26, 1961 | "column": 6 1962 | } 1963 | }, 1964 | "metadata": { 1965 | "polymer": { 1966 | "attributeType": "Number" 1967 | } 1968 | }, 1969 | "defaultValue": "25" 1970 | }, 1971 | { 1972 | "name": "draggable", 1973 | "type": "boolean | null | undefined", 1974 | "description": "Set to true if the marker should be draggable", 1975 | "privacy": "public", 1976 | "sourceRange": { 1977 | "start": { 1978 | "line": 30, 1979 | "column": 5 1980 | }, 1981 | "end": { 1982 | "line": 33, 1983 | "column": 6 1984 | } 1985 | }, 1986 | "metadata": { 1987 | "polymer": { 1988 | "attributeType": "Boolean" 1989 | } 1990 | }, 1991 | "defaultValue": "false" 1992 | } 1993 | ], 1994 | "methods": [ 1995 | { 1996 | "name": "ready", 1997 | "description": "", 1998 | "privacy": "protected", 1999 | "sourceRange": { 2000 | "start": { 2001 | "line": 36, 2002 | "column": 3 2003 | }, 2004 | "end": { 2005 | "line": 39, 2006 | "column": 4 2007 | } 2008 | }, 2009 | "metadata": {}, 2010 | "params": [], 2011 | "return": { 2012 | "type": "void" 2013 | } 2014 | }, 2015 | { 2016 | "name": "getPosition", 2017 | "description": "Returns the position of the marker", 2018 | "privacy": "public", 2019 | "sourceRange": { 2020 | "start": { 2021 | "line": 44, 2022 | "column": 3 2023 | }, 2024 | "end": { 2025 | "line": 46, 2026 | "column": 4 2027 | } 2028 | }, 2029 | "metadata": {}, 2030 | "params": [] 2031 | }, 2032 | { 2033 | "name": "getDraggable", 2034 | "description": "Returns whether marker is draggable.", 2035 | "privacy": "public", 2036 | "sourceRange": { 2037 | "start": { 2038 | "line": 51, 2039 | "column": 3 2040 | }, 2041 | "end": { 2042 | "line": 53, 2043 | "column": 4 2044 | } 2045 | }, 2046 | "metadata": {}, 2047 | "params": [] 2048 | }, 2049 | { 2050 | "name": "getMap", 2051 | "description": "Returns the map instance.", 2052 | "privacy": "public", 2053 | "sourceRange": { 2054 | "start": { 2055 | "line": 58, 2056 | "column": 3 2057 | }, 2058 | "end": { 2059 | "line": 63, 2060 | "column": 4 2061 | } 2062 | }, 2063 | "metadata": {}, 2064 | "params": [] 2065 | }, 2066 | { 2067 | "name": "setMap", 2068 | "description": "Sets the map instance", 2069 | "privacy": "public", 2070 | "sourceRange": { 2071 | "start": { 2072 | "line": 67, 2073 | "column": 3 2074 | }, 2075 | "end": { 2076 | "line": 71, 2077 | "column": 4 2078 | } 2079 | }, 2080 | "metadata": {}, 2081 | "params": [ 2082 | { 2083 | "name": "map" 2084 | } 2085 | ], 2086 | "return": { 2087 | "type": "void" 2088 | } 2089 | }, 2090 | { 2091 | "name": "drawfunction", 2092 | "description": "Draw callback forwarded to the function `update`.", 2093 | "privacy": "public", 2094 | "sourceRange": { 2095 | "start": { 2096 | "line": 76, 2097 | "column": 3 2098 | }, 2099 | "end": { 2100 | "line": 78, 2101 | "column": 4 2102 | } 2103 | }, 2104 | "metadata": {}, 2105 | "params": [], 2106 | "return": { 2107 | "type": "void" 2108 | } 2109 | }, 2110 | { 2111 | "name": "update", 2112 | "description": "Override this function to implement custom positioning.\nBy default will `left` and `top` CSS settings are used to position the element.", 2113 | "privacy": "public", 2114 | "sourceRange": { 2115 | "start": { 2116 | "line": 83, 2117 | "column": 3 2118 | }, 2119 | "end": { 2120 | "line": 88, 2121 | "column": 4 2122 | } 2123 | }, 2124 | "metadata": {}, 2125 | "params": [ 2126 | { 2127 | "name": "position" 2128 | }, 2129 | { 2130 | "name": "size" 2131 | } 2132 | ], 2133 | "return": { 2134 | "type": "void" 2135 | } 2136 | } 2137 | ], 2138 | "staticMethods": [], 2139 | "demos": [], 2140 | "metadata": {}, 2141 | "sourceRange": { 2142 | "start": { 2143 | "line": 9, 2144 | "column": 1 2145 | }, 2146 | "end": { 2147 | "line": 90, 2148 | "column": 2 2149 | } 2150 | }, 2151 | "privacy": "public", 2152 | "name": "GoogleMapOverlayViewMarkerBehavior", 2153 | "attributes": [ 2154 | { 2155 | "name": "position", 2156 | "description": "The position of the marker on the map", 2157 | "sourceRange": { 2158 | "start": { 2159 | "line": 16, 2160 | "column": 5 2161 | }, 2162 | "end": { 2163 | "line": 19, 2164 | "column": 6 2165 | } 2166 | }, 2167 | "metadata": {}, 2168 | "type": "Object | null | undefined" 2169 | }, 2170 | { 2171 | "name": "size", 2172 | "description": "The size of the marker", 2173 | "sourceRange": { 2174 | "start": { 2175 | "line": 23, 2176 | "column": 5 2177 | }, 2178 | "end": { 2179 | "line": 26, 2180 | "column": 6 2181 | } 2182 | }, 2183 | "metadata": {}, 2184 | "type": "number | null | undefined" 2185 | }, 2186 | { 2187 | "name": "draggable", 2188 | "description": "Set to true if the marker should be draggable", 2189 | "sourceRange": { 2190 | "start": { 2191 | "line": 30, 2192 | "column": 5 2193 | }, 2194 | "end": { 2195 | "line": 33, 2196 | "column": 6 2197 | } 2198 | }, 2199 | "metadata": {}, 2200 | "type": "boolean | null | undefined" 2201 | } 2202 | ], 2203 | "events": [], 2204 | "styling": { 2205 | "cssVariables": [], 2206 | "selectors": [] 2207 | }, 2208 | "slots": [] 2209 | } 2210 | ] 2211 | } 2212 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "google-map-markerclusterer", 3 | "version": "2.0.0", 4 | "authors": [ 5 | "Ümit Seren " 6 | ], 7 | "description": "Markerclusterer Plus for google maps as a polymer web-component", 8 | "keywords": [ 9 | "Polymer", 10 | "web-components" 11 | ], 12 | "main": "google-map-markerclusterer.html", 13 | "license": "MIT", 14 | "homepage": "https://github.com/timeu/google-map-markerclusterer", 15 | "ignore": [ 16 | "/.*", 17 | "/test/", 18 | "/demo/" 19 | ] 20 | , 21 | "dependencies": { 22 | "polymer": "Polymer/polymer#^2.0.0", 23 | "google-map": "GoogleWebComponents/google-map#^2.0.5" 24 | }, 25 | "devDependencies": { 26 | "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0", 27 | "web-component-tester": "Polymer/web-component-tester#^6.0.0", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0", 29 | "iron-component-page": "^3.0.1" 30 | }, 31 | "resolutions": { 32 | "polymer": "^2.0.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | google-map-clustermarker Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 28 | 29 | 69 | 70 | 71 | 72 |

An example of `google-map-clustermarker':

73 | 74 | 75 |

Custom markers:

76 | 77 | 78 | 79 |

Custom markers and custom cluster:

80 | 81 | 82 | 83 | 84 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /demo/markerclusterer-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 77 | 238 | -------------------------------------------------------------------------------- /demo/my-css-pie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo/my-custom-clustericon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 36 | 37 | 67 | -------------------------------------------------------------------------------- /demo/my-custom-marker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 61 | 62 | -------------------------------------------------------------------------------- /demo/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MarkerClusterer v3 Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 43 | 65 | 66 | 67 |

A simple example of MarkerClusterer (100 markers)

68 |

69 |   70 |

71 |
72 | 73 | 74 |
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /google-map-defaulticon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 28 | 29 | 153 | -------------------------------------------------------------------------------- /google-map-markercluster-icon-behavior.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /google-map-markercluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 296 | -------------------------------------------------------------------------------- /google-map-markerclusterer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 479 | 480 | -------------------------------------------------------------------------------- /google-map-overlayview-behavior.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /google-map-overlayview-marker-behavior.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /google-map-overlayview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 31 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timeu/google-map-markerclusterer/51bd6401a93494b509adf9fda279da857d6e2f99/preview.gif -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timeu/google-map-markerclusterer/51bd6401a93494b509adf9fda279da857d6e2f99/preview.png --------------------------------------------------------------------------------