Commit 027e966b authored by Dorian's avatar Dorian
Browse files

finishing generating the documents

parent e3c508ba
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
# mstest test results
sudo: false
language: node_js
- 6
- "travis_phantomjs"
- "export PHANTOMJS_VERSION=2.1.1"
- "hash -r"
- "phantomjs --version"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "hash -r"
- "phantomjs --version"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "hash -r"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then wget$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != \"$PHANTOMJS_VERSION\" ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "hash -r"
- "phantomjs --version"
\ No newline at end of file
(all changes without author notice are by [@danzel](
## 1.4.1 (2018-09-14)
### Bugfixes
* Better support stopping dragged markers from being clustered (by [@DerGuteWolf]( [#909](
## 1.4.0 (2018-08-22)
Required leaflet version bumped to 1.3.1
### Improvements
* Tests run against leaflet 1.1.0+ [#863](
### Bugfixes
* Fix clearLayers not removing removed markers [#860](
* Remember opacity 0 correctly (by [@r-yanyo]( [#890](
* Fix chunkedLoading LatLngBounds.intersects() (by [@boldtrn]( [#743]( [#891](
## 1.3.0 (2018-01-19)
### Improvements
* Use Rollup for builds (by [@IvanSanchez]( [#769](
### Bugfixes
* Fix Spiderfier positioning for small markers (by [@ghybs]( [#846](
* Fix anchor usage with latest leaflet version [#861](
## 1.2.0 (2017-11-06)
### Improvements
* Move `clusterPane` option in to `options` field (by [@ghybs]( [#832](
### Bugfixes
* Fix very small `maxClusterRadius` hanging the browser (by [@lucaswerkmeister]( [#838](
## 1.1.0 (2017-08-27)
### Improvements
* Add `clusterPane` option to allow putting clusters in a different pane (by [@ckrahe]( [#819](
## 1.0.6 (2017-06-19)
### Bugfixes
* Fix some issues when used with non-integer zoom [#789](
* Change examples to use https (by [@ghybs]( [#794](
## 1.0.5 (2017-04-26)
### Improvements
* Allow passing fitBounds options to zoomToBounds (by [@timkelty]( [#779](
### Bugfixes
* Fixed bug where disableClusteringAtZoom being 0 is treated the same as null (by [@MrCheeze]( [#773](
## 1.0.4 (2017-03-14)
### Bugfixes
* Fix errors removing a MarkerClusterGroup from the map during an animation [#758](
## 1.0.3 (2017-02-02)
### Bugfixes
* Fix moving markers while the MarkerClusterGroup is not on the map [#753](
## 1.0.2 (2017-01-27)
### Improvements
* Support `layeradd` and `layerremove` events [#647](
### Bugfixes
* Add support for maps with negative minZoom [#704](
* Fixed zoomToShowLayer() markers disappearing bug (by [@z3ut]( [#739](
* Fix an issue when opening a popup inside of zoomToShowLayer
* If a marker is moved with an open popup on it, re-open the popup after moving it. [#651](
## 1.0.1 (2017-01-25)
### Improvements
* Add install and build steps with jake (by [@kazes]( [#733](
* Readme improvements (by [@ghybs](, [@bertyhell]( [#734](, [#734](
* Bump all examples to leaflet 1.0.3
### Bugfixes
* Fixed leaflet 1.0.2 bug where clearLayers would throw an exception (by [@marcianoviereck92]( [#746](
## 1.0.0 (2016-10-03)
### Improvements
* Compatibility with Leaflet 1.0.0 (by [@danzel](, [@Eschon](, [@ghybs](, [@IvanSanchez](
* Support moving markers [#57](
* chunkedLoading option to keep browser more responsive during larging a load data set [#292](
* maxClusterRadius can be a function (by [@Schwanksta]( [#298](
* Spiderfy without zooming when all markers at same location (by [@rdenniston](, [@ghybs]( [#415](, [#606](
* On becoming visible, markers retain their original opacity. (by [@IvanSanchez]( [#444](
* Spiderleg Polyline options (by [@mikeatlas]( [#466](
* Extra methods to allow refreshing cluster icons (by [@ghybs]( [#564](
* Ability to disable animations (by [@ghybs]( [#578](
* Optimized performance of bulk addLayers and removeLayers (by [@ghybs]( [#584](
* Replaced spiderfy legs animation from SMIL to CSS transition (by [@ghybs]( [#585](
* Provide more detailed context information on the spiderfied event (by [@evanvosberg]( [#421](
* Add unspiderfied event
* Readme updates (by [@ghybs](, [@tomchadwin]( [@Cyrille37]( [@franckl]( [@mikeatlas](
[@rdenniston]( [@maackle]( [@fureigh]( [@Wildhoney]( [@Schwanksta]( [@frankrowe](
* Improve adding and removing nested LayerGroups (by [@ghybs]( [#624](
* Add public unspiderfy method (by [@zverev]( [#617](
* Optimized performance of bulk add with complex icon create function (by [@mlazowik]( [#697](
* Remove leaflet from peerDependencies (by [@tyleralves]( [#703](
* Simplified _recursively (by [@ghybs]( [#656](
### Bugfixes
* Fix getBounds when removeOutsideVisibleBounds: false is set. [#321](
* Fix zoomToShowLayer fails after initial spiderfy [#286](
* Fix cluster not disappearing on Android [#344](
* Fix RemoveLayers() when spiderified (by [@Grsmto]( [#358](
* Remove lines from map when removing cluster (by [@olive380]( [#532](
* Fix getConvexHull when all markers are located at same latitude (by [@olive380]( [#533](
* Fix removeLayers when cluster is not on the map (by [@eschon]( [#556](
* Improved zoomToShowLayer with callback check (by [@ghybs]( [#572](
* Improved reliability of RefreshSpec test suite for PhantomJS (by [@ghybs]( [#577](
* Corrected effect of removeOutsideVisibleBounds option (by [@ghybs]( [#575](
* Fix getLayer when provided a string [#531](
* Documentation improvements (by [@ghybs]( [#579](
* Correct _getExpandedVisibleBounds for Max Latitude (by [@ghybs]( [#587](
* Correct unspiderfy vector (by [@ghybs]( [#604](
* Remove "leaflet-cluster-anim" class on map remove while spiderfied (by [@ghybs]( [#607](
* Fix disableClusteringAtZoom maxZoom troubles (by [@OriginalSin]( [#609](
* Fix clusters not disappearing when they were near the edge on mobile (by [@ghybs]( [#529](
* Remove leaflet from dependencies (by [@ghybs]( [#639](
* Fix interaction between zoomOrSpiderfy and disableClusteringAtZoom (by [@ghybs]( [#633]( [#648](
## 0.4 (2013-12-19)
### Improvements
* Fix Quick Zoom in/out causing everything to disappear in Firefox (Reported by [@paulovieira]( [#140](
* Slow the expand/contract animation down from 200ms to 300ms
### Bugfixes
* Fix some cases zoomToShowLayer wouldn't work (Reported by [@absemetov]( [#203]( [#228]( [#286](
## 0.3 (2013-12-18)
### Improvements
* Work better with custom projections (by [@andersarstrand]( [#74](
* Add custom getBounds that works (Reported by [@2803media](
* Allow spacing spiderfied icons further apart (Reported by [@stevevance]( [#100](
* Add custom eachLayer that works (Reported by [@cilogi]( [#102](
* Add an option (removeOutsideVisibleBounds) to prevent removing clusters that are outside of the visible bounds (by [@wildhoney]( [#103](
* Add getBounds method to cluster (Reported by [@nderambure]( [#88](
* Lots of unit tests
* Support having Circle / CircleMarker as child markers
* Add factory methods (Reported by [@mourner]( [#21](
* Add getVisibleParent method to allow getting the visible parent cluster or the marker if it is visible. (By [@littleiffel]( [#102](
* Allow adding non-clusterable things to a MarkerClusterGroup, we don't cluster them. (Reported by [@benbalter]( [#195](
* removeLayer supports taking a FeatureGroup (Reported by [@pabloalcaraz]( [#236](
* DistanceGrid tests, QuickHull tests and improvements (By [@tmcw]( [#247]( [#248]( [#249](
* Implemented getLayers (Reported by [@metajungle]( [#222](
* zoomToBounds now only zooms in as far as it needs to to get all of the markers on screen if this is less zoom than zooming to the actual bounds would be (Reported by [@adamyonk]( [#185](
* Keyboard accessibility improvements (By [@Zombienaute]( [#273](
* IE Specific css in the default styles is no longer a separate file (By [@frankrowe]( [#280](
* Improve usability with small maps (Reported by [@JSCSJSCS]( [#144](
* Implement FeatureGroup.getLayer (Reported by [@newmanw]( [#244](
### Bugfixes
* Fix singleMarkerMode when you aren't on the map (by [@duncanparkes]( [#77](
* Fix clearLayers when you aren't on the map (by [@duncanparkes]( [#79](
* IE10 Bug fix (Reported by [@theLundquist]( [#86](
* Fixes for hasLayer after removing a layer (Reported by [@cvisto]( [#44](
* Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. (Reported by [@apuntovanini]( [#99](
* Fix map.removeLayer(markerClusterGroup) not working (Reported by [@Driklyn]( [#108](
* Fix map.addLayers not updating cluster icons (Reported by [@Driklyn]( [#114](
* Fix spiderfied clusters breaking if a marker is added to them (Reported by [@Driklyn]( [#114](
* Don't show coverage for spiderfied clusters as it will be wrong. (Reported by [@ajbeaven]( [#95](
* Improve zoom in/out immediately making all everything disappear, still issues in Firefox [#140](
* Fix animation not stopping with only one marker. (Reported by [@Driklyn]( [#146](
* Various fixes for new leaflet (Reported by [@PeterAronZentai]( [#159](
* Fix clearLayers when we are spiderfying (Reported by [@skullbooks]( [#162](
* Fix removing layers in certain situations (Reported by [@bpavot]( [#160](
* Support calling hasLayer with null (by [@l0c0luke]( [#170](
* Lots of fixes for removing a MarkerClusterGroup from the map (Reported by [@annetdeboer]( [#200](
* Throw error when being added to a map with no maxZoom.
* Fixes for markers not appearing after a big zoom (Reported by [@arnoldbird]( [#216]( (Reported by [@mathilde-pellerin]( [#260](
* Fix coverage polygon not being removed when a MarkerClusterGroup is removed (Reported by [@ZeusTheTrueGod]( [#245](
* Fix getVisibleParent when no parent is visible (Reported by [@ajbeaven]( [#265](
* Fix spiderfied markers not hiding on a big zoom (Reported by [@Vaesive]( [#268](
* Fix clusters not hiding on a big zoom (Reported by [@versusvoid]( [#281](
* Don't fire multiple clustermouseover/off events due to child divs in the cluster marker (Reported by [@heidemn]( [#252](
## 0.2 (2012-10-11)
### Improvements
* Add addLayers/removeLayers bulk add and remove functions that perform better than the individual methods
* Allow customising the polygon generated for showing the area a cluster covers (by [@yohanboniface]( [#68](
* Add zoomToShowLayer method to zoom down to a marker then call a callback once it is visible
* Add animateAddingMarkers to allow disabling animations caused when adding/removing markers
* Add hasLayer
* Pass the L.MarkerCluster to iconCreateFunction to give more flexibility deciding the icon
* Make addLayers support geojson layers
* Allow disabling clustering at a given zoom level
* Allow styling markers that are added like they were clusters of size 1
### Bugfixes
* Support when leaflet is configured to use canvas rather than SVG
* Fix some potential crashes in zoom handlers
* Tidy up when we are removed from the map
## 0.1 (2012-08-16)
Initial Release!
Contributing to Leaflet.MarkerCluster
1. [Reporting Bugs](#reporting-bugs)
2. [Contributing Code](#contributing-code)
3. [Building](#building)
4. [Testing](#testing)
## Reporting Bugs
Before reporting a bug on the project's [issues page](,
first make sure that your issue is caused by Leaflet.MarkerCluster, not your application code
(e.g. passing incorrect arguments to methods, etc.).
Second, search the already reported issues for similar cases,
and if it's already reported, just add any additional details in the comments.
After you've made sure that you've found a new Leaflet.markercluster bug,
here are some tips for creating a helpful report that will make fixing it much easier and quicker:
* Write a **descriptive, specific title**. Bad: *Problem with polylines*. Good: *Doing X in IE9 causes Z*.
* Include **browser, OS and Leaflet version** info in the description.
* Create a **simple test case** that demonstrates the bug (e.g. using [JSFiddle]( or [JS Bin](
* Check whether the bug can be reproduced in **other browsers**.
* Check if the bug occurs in the stable version, master, or both.
* *Bonus tip:* if the bug only appears in the master version but the stable version is fine,
use `git bisect` to find the exact commit that introduced the bug.
If you just want some help with your project,
try asking [on the Leaflet forum](!forum/leaflet-js) instead.
## Contributing Code
### Considerations for Accepting Patches
While we happily accept patches, we're also committed to keeping Leaflet simple, lightweight and blazingly fast.
So bugfixes, performance optimizations and small improvements that don't add a lot of code
are much more likely to get accepted quickly.
Before sending a pull request with a new feature, check if it's been discussed before already
(either on [GitHub issues](
or [Leaflet UserVoice](,
and ask yourself two questions:
1. Are you sure that this new feature is important enough to justify its presence in the Leaflet core?
Or will it look better as a plugin in a separate repository?
2. Is it written in a simple, concise way that doesn't add bulk to the codebase?
If your feature or API improvement did get merged into master,
please consider submitting another pull request with the corresponding [documentation update](#improving-documentation).
## Building
Install the dependencies:
npm install -g jake
npm install
Then to build:
Output will be in the ```dist/``` directory
## Testing
To run unit tests:
jake test
- [ ] I'm reporting a bug, not asking for help
- [ ] I'm sure this is a Leaflet.MarkerCluster code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
- [ ] I've searched through the issues to make sure it's not yet reported
## How to reproduce
- Leaflet version I'm using:
- Leaflet.MarkerCluster version I'm using:
- Browser (with version) I'm using:
- OS/Platform (with version) I'm using:
- step 1
- step 2
## What behaviour I'm expecting and which behaviour I'm seeing
## Minimal example reproducing the issue
- [ ] this example is as simple as possible
- [ ] this example does not rely on any third party code
Using or any other jsfiddle-like site.
Leaflet.markercluster building, testing and linting scripts.
To use, install Node, then run the following commands in the project root:
npm install -g jake
npm install
To check the code for errors and build Leaflet from source, run "jake".
To run the tests, run "jake test".
For a custom build, open build/build.html in the browser and follow the instructions.
var path = require('path');
desc('Check Leaflet.markercluster source for errors with JSHint');
task('lint', function(){
jake.exec('jshint', {
printStdout: true
}, function () {
console.log('\tCheck passed.\n');
desc('Combine Leaflet.markercluster source files');
task('build', ['lint'], function(){
jake.exec('npm run-script rollup', function() { console.log('Rolled up.'); });
desc('Compress bundled files');
task('uglify', ['build'], function(){
jake.exec('npm run-script uglify', function() { console.log('Uglyfied.'); });
desc('Run PhantomJS tests');
task('test', ['lint'], function() {
var karma = require('karma'),
testConfig = {configFile : path.join(__dirname, './spec/karma.conf.js')};
testConfig.browsers = ['PhantomJS'];
function isArgv(optName) {
return process.argv.indexOf(optName) !== -1;
if (isArgv('--chrome')) {
if (isArgv('--safari')) {
if (isArgv('--ff')) {
if (isArgv('--ie')) {
if (isArgv('--cov')) {
testConfig.preprocessors = {
'src/**/*.js': 'coverage'
testConfig.coverageReporter = {
type : 'html',
dir : 'coverage/'
testConfig.reporters = ['coverage'];
console.log('Running tests...');
var server = new karma.Server(testConfig, function(exitCode) {
if (!exitCode) {
console.log('\tTests ran successfully.\n');
} else {
task('default', ['build', 'uglify']);
Copyright 2012 David Leaver
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Provides Beautiful Animated Marker Clustering functionality for [Leaflet](, a JS library for interactive maps.
*Requires Leaflet 1.0.0*
![cluster map example](example/map.png)
For a Leaflet 0.7 compatible version, [use the leaflet-0.7 branch](<br>
For a Leaflet 0.5 compatible version, [Download b128e950](<br>
For a Leaflet 0.4 compatible version, [Download the 0.2 release](
TOC created with gh-md-toc
removed link to h1 and indented back 2 spaces all links.
## Table of Contents
* [Using the plugin](#using-the-plugin)
* [Building, testing and linting scripts](#building-testing-and-linting-scripts)
* [Examples](#examples)
* [Usage](#usage)
* [Options](#options)
* [Defaults](#defaults)
* [Customising the Clustered Markers](#customising-the-clustered-markers)
* [All Options](#all-options)
* [Enabled by default (boolean options)](#enabled-by-default-boolean-options)
* [Other options](#other-options)
* [Chunked addLayers options](#chunked-addlayers-options)
* [Events](#events)
* [Additional MarkerClusterGroup Events](#additional-markerclustergroup-events)
* [Methods](#methods)
* [Group methods](#group-methods)
* [Adding and removing Markers](#adding-and-removing-markers)
* [Bulk adding and removing Markers](#bulk-adding-and-removing-markers)
* [Getting the visible parent of a marker](#getting-the-visible-parent-of-a-marker)
* [Refreshing the clusters icon](#refreshing-the-clusters-icon)
* [Other Group Methods](#other-group-methods)
* [Clusters methods](#clusters-methods)
* [Getting the bounds of a cluster](#getting-the-bounds-of-a-cluster)
* [Zooming to the bounds of a cluster](#zooming-to-the-bounds-of-a-cluster)
* [Other clusters methods](#other-clusters-methods)
* [Handling LOTS of markers](#handling-lots-of-markers)
* [License](#license)
* [Sub-plugins](#sub-plugins)
## Using the plugin
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
* [Download the `v1.4.1` release](
* Use unpkg CDN: ``
* Install with npm: `npm install leaflet.markercluster`
In each case, use files in the `dist` folder:
* `MarkerCluster.css`
* `MarkerCluster.Default.css` (not needed if you use your own `iconCreateFunction` instead of the default one)
* `leaflet.markercluster.js` (or `leaflet.markercluster-src.js` for the non-minified version)
### Building, testing and linting scripts
Install jake `npm install -g jake` then run `npm install`
* To check the code for errors and build Leaflet from source, run `jake`.
* To run the tests, run `jake test`.
### Examples
See the included examples for usage.
The [realworld example]( is a good place to start, it uses all of the defaults of the clusterer.
Or check out the [custom example]( for how to customise the behaviour and appearance of the clusterer
### Usage
Create a new MarkerClusterGroup, add your markers to it, then add it to the map
var markers = L.markerClusterGroup();
... Add more layers ...
## Options
### Defaults
By default the Clusterer enables some nice defaults for you:
* **showCoverageOnHover**: When you mouse over a cluster it shows the bounds of its markers.