Compare commits

..

9 Commits

Author SHA1 Message Date
David Molineus
ad4b61f696 Update leaflet providers to 1.1.17 2017-07-06 16:51:37 +02:00
David Molineus
170c7e8d8e Update to marker cluster version 1.0.6. 2017-07-06 16:42:34 +02:00
David Molineus
eee8019f9d Update leaflet fullscreen. 2017-07-06 16:38:23 +02:00
David Molineus
442ecc7166 Update leaflet 1.1.0. 2017-07-06 16:31:05 +02:00
David Molineus
8c4b151b1d Use double pipes. 2017-01-27 12:15:15 +01:00
David Molineus
21fd7c8bd3 Update leaflet loading to version 0.1.24 2017-01-27 12:06:34 +01:00
David Molineus
df8851fc8b Update leaflet markercluster to version 1.0.2. 2017-01-27 12:03:48 +01:00
David Molineus
5ca0430872 Update to leaflet 1.0.3. 2017-01-27 11:59:16 +01:00
David Molineus
e985eb6cba Add notes about Contao 4 and the version number format. 2017-01-27 11:56:20 +01:00
35 changed files with 9332 additions and 8658 deletions

View File

@@ -12,12 +12,12 @@ Contao CMS.
This package contains following packages: This package contains following packages:
- [leaflet 1.0.2](http://leafletjs.com) - [leaflet 1.1.0](http://leafletjs.com)
- [Leaflet-providers 1.1.15](http://leaflet-extras.github.io/leaflet-providers) - [Leaflet-providers 1.1.17](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.0.0](https://github.com/Leaflet/Leaflet.markercluster) - [Leaflet.markercluster 1.0.6](https://github.com/Leaflet/Leaflet.markercluster)
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore) - [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
- [Leaflet.loading 0.1.23](https://github.com/ebrelsford/Leaflet.loading) - [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
- [Leaflet.Control.FullScreen 1.4.2](https://github.com/brunob/leaflet.fullscreen) - [Leaflet.Control.FullScreen 1.4.3](https://github.com/brunob/leaflet.fullscreen)
- [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder) - [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder)
- [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers) - [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers)
- [osmtogeojson 2.2.12](https://github.com/tyrasd/osmtogeojson) - [osmtogeojson 2.2.12](https://github.com/tyrasd/osmtogeojson)
@@ -33,9 +33,20 @@ You can install this package via composer.
$ php composer.phar require netzmacht/contao-leaflet-libraries:~1.0 $ php composer.phar require netzmacht/contao-leaflet-libraries:~1.0
``` ```
When releasing the first stable version of If you use Contao 4 without the managed edition, you also have to register the module as a bundle.
[netzmacht/contao-leaflet-maps](https://github.com/netzmacht/contao-leaflet-maps) the version number gonna be the same
as the included leaflet library. ```php
<?php
// Dependency is automatically installed and has to be registered
new Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle('leaflet-libs', $this->getRootDir()),
```
Version numbers
---------------
Each release has is tagged with the main leaflet version which is shipped with this bundle. For any bugfix release which
is created without shipping a newer version of leaflet, this package uses four parts of the version number.
License License
------- -------

View File

@@ -155,7 +155,7 @@ source : http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugi
fullScreenApi.isFullScreen = function () { fullScreenApi.isFullScreen = function () {
switch (this.prefix) { switch (this.prefix) {
case '': case '':
return document.fullScreen; return document.fullscreen;
case 'webkit': case 'webkit':
return document.webkitIsFullScreen; return document.webkitIsFullScreen;
case 'ms': case 'ms':

View File

@@ -1 +1 @@
!function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n,t="leaflet-control-zoom-fullscreen",l="";return n=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:t+=" fullscreen-icon",this._createButton(this.options.title,t,l,n,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),n},_createButton:function(n,t,l,r,i,s){return this.link=L.DomUtil.create("a",t,r),this.link.href="#",this.link.title=n,this.link.innerHTML=l,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",i,s),L.DomEvent.addListener(r,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(r,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(r,e.fullScreenEventName,this._handleEscKey,s),L.DomEvent.addListener(document,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,e.fullScreenEventName,this._handleEscKey,s),this.link},toggleFullScreen:function(){var n=this._map;n._exitFired=!1,n._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.removeClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.addClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("enterFullscreen"),n._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var n=this._map;e.isFullScreen(n)||n._exitFired||(n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))}),L.control.fullscreen=function(e){return new L.Control.FullScreen(e)};var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},n="webkit moz o ms khtml".split(" ");if("undefined"!=typeof document.exitFullscreen)e.supportsFullScreen=!0;else{for(var t=0,l=n.length;t<l;t++)if(e.prefix=n[t],"undefined"!=typeof document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}"undefined"!=typeof document.msExitFullscreen&&(e.prefix="ms",e.supportsFullScreen=!0)}e.supportsFullScreen&&("ms"===e.prefix?e.fullScreenEventName="MSFullscreenChange":e.fullScreenEventName=e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},e.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var n=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(n)})}),window.fullScreenApi=e}(); !function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n,t="leaflet-control-zoom-fullscreen",l="";return n=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:t+=" fullscreen-icon",this._createButton(this.options.title,t,l,n,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),n},_createButton:function(n,t,l,r,i,s){return this.link=L.DomUtil.create("a",t,r),this.link.href="#",this.link.title=n,this.link.innerHTML=l,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",i,s),L.DomEvent.addListener(r,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(r,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(r,e.fullScreenEventName,this._handleEscKey,s),L.DomEvent.addListener(document,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,e.fullScreenEventName,this._handleEscKey,s),this.link},toggleFullScreen:function(){var n=this._map;n._exitFired=!1,n._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.removeClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.addClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("enterFullscreen"),n._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var n=this._map;e.isFullScreen(n)||n._exitFired||(n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))}),L.control.fullscreen=function(e){return new L.Control.FullScreen(e)};var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},n="webkit moz o ms khtml".split(" ");if("undefined"!=typeof document.exitFullscreen)e.supportsFullScreen=!0;else{for(var t=0,l=n.length;t<l;t++)if(e.prefix=n[t],"undefined"!=typeof document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}"undefined"!=typeof document.msExitFullscreen&&(e.prefix="ms",e.supportsFullScreen=!0)}e.supportsFullScreen&&("ms"===e.prefix?e.fullScreenEventName="MSFullscreenChange":e.fullScreenEventName=e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullscreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},e.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var n=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(n)})}),window.fullScreenApi=e}();

View File

@@ -44,8 +44,8 @@ __Events and options__:
L.control.fullscreen({ L.control.fullscreen({
position: 'topleft', // change the position of the button can be topleft, topright, bottomright or bottomleft, defaut topleft position: 'topleft', // change the position of the button can be topleft, topright, bottomright or bottomleft, defaut topleft
title: 'Show me the fullscreen !', // change the title of the button, default Full Screen title: 'Show me the fullscreen !', // change the title of the button, default Full Screen
titleCancel: 'Exit fullscreen mode' // change the title of the button when fullscreen is on, default Exit Full Screen titleCancel: 'Exit fullscreen mode', // change the title of the button when fullscreen is on, default Exit Full Screen
content: null // change the content of the button, can be HTML, default null content: null, // change the content of the button, can be HTML, default null
forceSeparateButton: true, // force seperate button to detach from zoom buttons, default false forceSeparateButton: true, // force seperate button to detach from zoom buttons, default false
forcePseudoFullscreen: true, // force use of pseudo full screen even if full screen API is available, default false forcePseudoFullscreen: true, // force use of pseudo full screen even if full screen API is available, default false
fullscreenElement: false // Dom element to render in full screen, false by default, fallback to map._container fullscreenElement: false // Dom element to render in full screen, false by default, fallback to map._container

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet.fullscreen", "name": "leaflet.fullscreen",
"version": "1.4.2", "version": "1.4.3",
"homepage": "https://github.com/brunob/leaflet.fullscreen", "homepage": "https://github.com/brunob/leaflet.fullscreen",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet.fullscreen", "name": "leaflet.fullscreen",
"version": "1.4.2", "version": "1.4.3",
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.", "description": "Simple plugin for Leaflet that adds fullscreen button to your maps.",
"main": "Control.FullScreen.js", "main": "Control.FullScreen.js",
"scripts": { "scripts": {

View File

@@ -18,3 +18,4 @@ Your pull requests are very welcome! Please follow these guidelines:
* [kcwu](https://github.com/kcwu) * [kcwu](https://github.com/kcwu)
* [Robbie Trencheny](https://github.com/robbiet480) * [Robbie Trencheny](https://github.com/robbiet480)
* [David Molineus](https://github.com/dmolineus) * [David Molineus](https://github.com/dmolineus)
* [Marwen Arfa](https://github.com/arfa)

View File

@@ -5,14 +5,16 @@
} }
.leaflet-control-loading, .leaflet-control-loading,
.leaflet-control-zoom a.leaflet-control-loading , .leaflet-control-zoom a.leaflet-control-loading,
.leaflet-control-zoomslider a.leaflet-control-loading { .leaflet-control-zoomslider a.leaflet-control-loading,
.leaflet-control-layer-container {
display: none; display: none;
} }
.leaflet-control-loading.is-loading, .leaflet-control-loading.is-loading,
.leaflet-control-zoom a.leaflet-control-loading.is-loading, .leaflet-control-zoom a.leaflet-control-loading.is-loading,
.leaflet-control-zoomslider a.leaflet-control-loading.is-loading { .leaflet-control-zoomslider a.leaflet-control-loading.is-loading,
.leaflet-control-layer-container.is-loading {
display: block; display: block;
} }

View File

@@ -71,8 +71,9 @@
} }
else { else {
// Otherwise, create a container for the indicator // Otherwise, create a container for the indicator
container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-bar'); container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-control-layer-container leaflet-bar');
} }
this._indicatorContainer = container;
this._indicator = L.DomUtil.create('a', classes, container); this._indicator = L.DomUtil.create('a', classes, container);
if (this.options.spinjs) { if (this.options.spinjs) {
this._spinner = new Spinner(this.options.spin).spin(); this._spinner = new Spinner(this.options.spin).spin();
@@ -156,6 +157,7 @@
_showIndicator: function() { _showIndicator: function() {
// Show loading indicator // Show loading indicator
L.DomUtil.addClass(this._indicator, 'is-loading'); L.DomUtil.addClass(this._indicator, 'is-loading');
L.DomUtil.addClass(this._indicatorContainer, 'is-loading');
// If zoomControl exists, make the zoom-out button not last // If zoomControl exists, make the zoom-out button not last
if (!this.options.separate) { if (!this.options.separate) {
@@ -171,6 +173,7 @@
_hideIndicator: function() { _hideIndicator: function() {
// Hide loading indicator // Hide loading indicator
L.DomUtil.removeClass(this._indicator, 'is-loading'); L.DomUtil.removeClass(this._indicator, 'is-loading');
L.DomUtil.removeClass(this._indicatorContainer, 'is-loading');
// If zoomControl exists, make the zoom-out button last // If zoomControl exists, make the zoom-out button last
if (!this.options.separate) { if (!this.options.separate) {

View File

@@ -1 +1 @@
.leaflet-control-loading:empty{background-image:url('data:image/gif;base64,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');background-repeat:no-repeat}.leaflet-control-loading,.leaflet-control-zoom a.leaflet-control-loading,.leaflet-control-zoomslider a.leaflet-control-loading{display:none}.leaflet-control-loading.is-loading,.leaflet-control-zoom a.leaflet-control-loading.is-loading,.leaflet-control-zoomslider a.leaflet-control-loading.is-loading{display:block}.leaflet-bar-part-bottom{border-bottom:medium none;border-bottom-left-radius:4px;border-bottom-right-radius:4px} .leaflet-control-loading:empty{background-image:url('data:image/gif;base64,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');background-repeat:no-repeat}.leaflet-control-layer-container,.leaflet-control-loading,.leaflet-control-zoom a.leaflet-control-loading,.leaflet-control-zoomslider a.leaflet-control-loading{display:none}.leaflet-control-layer-container.is-loading,.leaflet-control-loading.is-loading,.leaflet-control-zoom a.leaflet-control-loading.is-loading,.leaflet-control-zoomslider a.leaflet-control-loading.is-loading{display:block}.leaflet-bar-part-bottom{border-bottom:medium none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}

File diff suppressed because one or more lines are too long

View File

@@ -11,7 +11,10 @@ spinner (image-less).
## Usage ## Usage
Leaflet.loading is only tested on Leaflet version 0.6 or greater. It will almost Leaflet.loading is only tested on Leaflet version 0.6 or greater. It will almost
certainly not work with older versions of Leaflet. certainly not work with older versions of Leaflet. Of course we intend to
support Leaflet 1.0, and we have tested against the latest release (beta 2).
Please create an issue if you find that any part of this project is not
compatible with Leaflet 1.0.
Include `Control.Loading.js` and `Control.Loading.css`, then create a map with Include `Control.Loading.js` and `Control.Loading.css`, then create a map with
`loadingControl: true` in its options. `loadingControl: true` in its options.
@@ -31,10 +34,11 @@ Once the above is complete you will have a loading indicator that only appears
when tiles are loading. when tiles are loading.
If you want to show the loading indicator while other AJAX requests or something If you want to show the loading indicator while other AJAX requests or something
else is occurring, simply fire the `dataloading` event on your map when you else is occurring, fire the `dataloading` event on your map when you begin
begin loading and `dataload` when you are finished loading. The control tracks loading and `dataload` when you are finished loading. Please note that there is
the number of concurrent loaders, so it is your responsibility to ensure that [an issue](https://github.com/ebrelsford/Leaflet.loading/issues/26) with the
the `dataloading` and `dataload` are called symmetrically. way this control tracks these events and that this will be re-worked in a
future version.
### Options ### Options
@@ -45,6 +49,8 @@ the `dataloading` and `dataload` are called symmetrically.
- **zoomControl**: (L.Control.Zoom) The zoom control that the control should be - **zoomControl**: (L.Control.Zoom) The zoom control that the control should be
added to. This is only necessary when adding a loading control to a zoom added to. This is only necessary when adding a loading control to a zoom
control that you added manually and do not want a separate loading control. control that you added manually and do not want a separate loading control.
- **delayIndicator**: (float) The number of milliseconds to wait before
showing the loading indicator. Defaults to `null` (no delay).
- **spinjs**: (boolean) Enable the use of [spin.js][]. Optional, defaults to - **spinjs**: (boolean) Enable the use of [spin.js][]. Optional, defaults to
`false` `false`
- **spin**: (object) A [spin.js][] options object. Optional, defaults to - **spin**: (object) A [spin.js][] options object. Optional, defaults to

View File

@@ -1,12 +1,15 @@
{ {
"name": "leaflet.loading", "name": "leaflet.loading",
"version": "0.1.16", "version": "0.1.24",
"homepage": "https://github.com/ebrelsford/leaflet.loading", "homepage": "https://github.com/ebrelsford/leaflet.loading",
"authors": [ "authors": [
"Eric Brelsford <ebrelsford@gmail.com>" "Eric Brelsford <ebrelsford@gmail.com>"
], ],
"description": "A loading-indicator control for Leaflet", "description": "A loading-indicator control for Leaflet",
"main": "src/Control.Loading.js", "main": [
"src/Control.Loading.css",
"src/Control.Loading.js"
],
"keywords": [ "keywords": [
"leaflet", "leaflet",
"map", "map",

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet-loading", "name": "leaflet-loading",
"version": "0.1.16", "version": "0.1.24",
"description": "A simple loading control for Leaflet", "description": "A simple loading control for Leaflet",
"main": "src/Control.Loading.js", "main": "src/Control.Loading.js",
"scripts": { "scripts": {

View File

@@ -3,9 +3,111 @@ Leaflet.markercluster
(all changes without author notice are by [@danzel](https://github.com/danzel)) (all changes without author notice are by [@danzel](https://github.com/danzel))
## Master ## 1.0.6 (2017-06-19)
##0.4 (2013-12-19) ### Bugfixes
* Fix some issues when used with non-integer zoom [#789](https://github.com/Leaflet/Leaflet.markercluster/issues/789)
* Change examples to use https (by [@ghybs](https://github.com/ghybs)) [#794](https://github.com/Leaflet/Leaflet.markercluster/pull/794)
## 1.0.5 (2017-04-26)
### Improvements
* Allow passing fitBounds options to zoomToBounds (by [@timkelty](https://github.com/timkelty)) [#779](https://github.com/Leaflet/Leaflet.markercluster/pull/779)
### Bugfixes
* Fixed bug where disableClusteringAtZoom being 0 is treated the same as null (by [@MrCheeze](https://github.com/MrCheeze)) [#773](https://github.com/Leaflet/Leaflet.markercluster/pull/773)
## 1.0.4 (2017-03-14)
### Bugfixes
* Fix errors removing a MarkerClusterGroup from the map during an animation [#758](https://github.com/Leaflet/Leaflet.markercluster/issues/758)
## 1.0.3 (2017-02-02)
### Bugfixes
* Fix moving markers while the MarkerClusterGroup is not on the map [#753](https://github.com/Leaflet/Leaflet.markercluster/issues/753)
## 1.0.2 (2017-01-27)
### Improvements
* Support `layeradd` and `layerremove` events [#647](https://github.com/Leaflet/Leaflet.markercluster/issues/647)
### Bugfixes
* Add support for maps with negative minZoom [#704](https://github.com/Leaflet/Leaflet.markercluster/issues/704)
* Fixed zoomToShowLayer() markers disappearing bug (by [@z3ut](https://github.com/z3ut)) [#739](https://github.com/Leaflet/Leaflet.markercluster/issues/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](https://github.com/Leaflet/Leaflet.markercluster/issues/651)
## 1.0.1 (2017-01-25)
### Improvements
* Add install and build steps with jake (by [@kazes](https://github.com/kazes)) [#733](https://github.com/Leaflet/Leaflet.markercluster/pull/733)
* Readme improvements (by [@ghybs](https://github.com/ghybs), [@bertyhell](https://github.com/bertyhell)) [#734](https://github.com/Leaflet/Leaflet.markercluster/pull/738), [#734](https://github.com/Leaflet/Leaflet.markercluster/pull/738
* Bump all examples to leaflet 1.0.3
### Bugfixes
* Fixed leaflet 1.0.2 bug where clearLayers would throw an exception (by [@marcianoviereck92](https://github.com/marcianoviereck92)) [#746](https://github.com/Leaflet/Leaflet.markercluster/pull/746)
## 1.0.0 (2016-10-03)
### Improvements
* Compatibility with Leaflet 1.0.0 (by [@danzel](https://githum.com/danzel), [@Eschon](https://github.com/Eschon), [@ghybs](https://github.com/ghybs), [@IvanSanchez](https://github.com/IvanSanchez))
* Support moving markers [#57](https://github.com/Leaflet/Leaflet.markercluster/issues/57)
* chunkedLoading option to keep browser more responsive during larging a load data set [#292](https://github.com/Leaflet/Leaflet.markercluster/issues/292)
* maxClusterRadius can be a function (by [@Schwanksta](https://github.com/Schwanksta)) [#298](https://github.com/Leaflet/Leaflet.markercluster/issues/298)
* Spiderfy without zooming when all markers at same location (by [@rdenniston](https://github.com/rdenniston), [@ghybs](https://github.com/ghybs)) [#415](https://github.com/Leaflet/Leaflet.markercluster/issues/415), [#606](https://github.com/Leaflet/Leaflet.markercluster/issues/606)
* On becoming visible, markers retain their original opacity. (by [@IvanSanchez](https://github.com/IvanSanchez)) [#444](https://github.com/Leaflet/Leaflet.markercluster/issues/444)
* Spiderleg Polyline options (by [@mikeatlas](https://github.com/mikeatlas)) [#466](https://github.com/Leaflet/Leaflet.markercluster/issues/466)
* Extra methods to allow refreshing cluster icons (by [@ghybs](https://github.com/ghybs)) [#564](https://github.com/Leaflet/Leaflet.markercluster/issues/564)
* Ability to disable animations (by [@ghybs](https://github.com/ghybs)) [#578](https://github.com/Leaflet/Leaflet.markercluster/issues/578)
* Optimized performance of bulk addLayers and removeLayers (by [@ghybs](https://github.com/ghybs)) [#584](https://github.com/Leaflet/Leaflet.markercluster/issues/584)
* Replaced spiderfy legs animation from SMIL to CSS transition (by [@ghybs](https://github.com/ghybs)) [#585](https://github.com/Leaflet/Leaflet.markercluster/issues/585)
* Provide more detailed context information on the spiderfied event (by [@evanvosberg](https://github.com/evanvosberg)) [#421](https://github.com/Leaflet/Leaflet.markercluster/issues/421)
* Add unspiderfied event
* Readme updates (by [@ghybs](https://github.com/ghybs), [@tomchadwin](https://github.com/tomchadwin) [@Cyrille37](https://github.com/Cyrille37) [@franckl](https://github.com/franckl) [@mikeatlas](https://github.com/mikeatlas)
[@rdenniston](https://github.com/rdenniston) [@maackle](https://github.com/maackle) [@fureigh](https://github.com/fureigh) [@Wildhoney](https://github.com/Wildhoney) [@Schwanksta](https://github.com/Schwanksta) [@frankrowe](https://github.com/frankrowe))
* Improve adding and removing nested LayerGroups (by [@ghybs](https://github.com/ghybs)) [#624](https://github.com/Leaflet/Leaflet.markercluster/pull/624)
* Add public unspiderfy method (by [@zverev](https://github.com/zverev)) [#617](https://github.com/Leaflet/Leaflet.markercluster/pull/617)
* Optimized performance of bulk add with complex icon create function (by [@mlazowik](https://github.com/mlazowik)) [#697](https://github.com/Leaflet/Leaflet.markercluster/pull/697)
* Remove leaflet from peerDependencies (by [@tyleralves](https://github.com/tyleralves)) [#703](https://github.com/Leaflet/Leaflet.markercluster/pull/703)
* Simplified _recursively (by [@ghybs](https://github.com/ghybs)) [#656](https://github.com/Leaflet/Leaflet.markercluster/pull/656)
### Bugfixes
* Fix getBounds when removeOutsideVisibleBounds: false is set. [#321](https://github.com/Leaflet/Leaflet.markercluster/issues/321)
* Fix zoomToShowLayer fails after initial spiderfy [#286](https://github.com/Leaflet/Leaflet.markercluster/issues/286)
* Fix cluster not disappearing on Android [#344](https://github.com/Leaflet/Leaflet.markercluster/issues/344)
* Fix RemoveLayers() when spiderified (by [@Grsmto](https://github.com/Grsmto)) [#358](https://github.com/Leaflet/Leaflet.markercluster/issues/358)
* Remove lines from map when removing cluster (by [@olive380](https://github.com/olive380)) [#532](https://github.com/Leaflet/Leaflet.markercluster/issues/532)
* Fix getConvexHull when all markers are located at same latitude (by [@olive380](https://github.com/olive380)) [#533](https://github.com/Leaflet/Leaflet.markercluster/issues/533)
* Fix removeLayers when cluster is not on the map (by [@eschon](https://github.com/eschon)) [#556](https://github.com/Leaflet/Leaflet.markercluster/issues/556)
* Improved zoomToShowLayer with callback check (by [@ghybs](https://github.com/ghybs)) [#572](https://github.com/Leaflet/Leaflet.markercluster/issues/572)
* Improved reliability of RefreshSpec test suite for PhantomJS (by [@ghybs](https://github.com/ghybs)) [#577](https://github.com/Leaflet/Leaflet.markercluster/issues/577)
* Corrected effect of removeOutsideVisibleBounds option (by [@ghybs](https://github.com/ghybs)) [#575](https://github.com/Leaflet/Leaflet.markercluster/issues/575)
* Fix getLayer when provided a string [#531](https://github.com/Leaflet/Leaflet.markercluster/issues/531)
* Documentation improvements (by [@ghybs](https://github.com/ghybs)) [#579](https://github.com/Leaflet/Leaflet.markercluster/issues/579)
* Correct _getExpandedVisibleBounds for Max Latitude (by [@ghybs](https://github.com/ghybs)) [#587](https://github.com/Leaflet/Leaflet.markercluster/issues/587)
* Correct unspiderfy vector (by [@ghybs](https://github.com/ghybs)) [#604](https://github.com/Leaflet/Leaflet.markercluster/issues/604)
* Remove "leaflet-cluster-anim" class on map remove while spiderfied (by [@ghybs](https://github.com/ghybs)) [#607](https://github.com/Leaflet/Leaflet.markercluster/issues/607)
* Fix disableClusteringAtZoom maxZoom troubles (by [@OriginalSin](https://github.com/OriginalSin)) [#609](https://github.com/Leaflet/Leaflet.markercluster/issues/609)
* Fix clusters not disappearing when they were near the edge on mobile (by [@ghybs](https://github.com/ghybs)) [#529](https://github.com/Leaflet/Leaflet.markercluster/issues/529)
* Remove leaflet from dependencies (by [@ghybs](https://github.com/ghybs)) [#639](https://github.com/Leaflet/Leaflet.markercluster/issues/639)
* Fix interaction between zoomOrSpiderfy and disableClusteringAtZoom (by [@ghybs](https://github.com/ghybs)) [#633](https://github.com/Leaflet/Leaflet.markercluster/issues/633) [#648](https://github.com/Leaflet/Leaflet.markercluster/issues/648)
## 0.4 (2013-12-19)
### Improvements ### Improvements
@@ -16,7 +118,8 @@ Leaflet.markercluster
* Fix some cases zoomToShowLayer wouldn't work (Reported by [@absemetov](https://github.com/absemetov)) [#203](https://github.com/Leaflet/Leaflet.markercluster/issues/203) [#228](https://github.com/Leaflet/Leaflet.markercluster/issues/228) [#286](https://github.com/Leaflet/Leaflet.markercluster/issues/286) * Fix some cases zoomToShowLayer wouldn't work (Reported by [@absemetov](https://github.com/absemetov)) [#203](https://github.com/Leaflet/Leaflet.markercluster/issues/203) [#228](https://github.com/Leaflet/Leaflet.markercluster/issues/228) [#286](https://github.com/Leaflet/Leaflet.markercluster/issues/286)
##0.3 (2013-12-18)
## 0.3 (2013-12-18)
### Improvements ### Improvements

View File

@@ -5,6 +5,8 @@ Provides Beautiful Animated Marker Clustering functionality for [Leaflet](http:/
*Requires Leaflet 1.0.0* *Requires Leaflet 1.0.0*
![cluster map example](example/map.png)
For a Leaflet 0.7 compatible version, [use the leaflet-0.7 branch](https://github.com/Leaflet/Leaflet.markercluster/tree/leaflet-0.7)<br> For a Leaflet 0.7 compatible version, [use the leaflet-0.7 branch](https://github.com/Leaflet/Leaflet.markercluster/tree/leaflet-0.7)<br>
For a Leaflet 0.5 compatible version, [Download b128e950](https://github.com/Leaflet/Leaflet.markercluster/archive/b128e950d8f5d7da5b60bd0aa9a88f6d3dd17c98.zip)<br> For a Leaflet 0.5 compatible version, [Download b128e950](https://github.com/Leaflet/Leaflet.markercluster/archive/b128e950d8f5d7da5b60bd0aa9a88f6d3dd17c98.zip)<br>
For a Leaflet 0.4 compatible version, [Download the 0.2 release](https://github.com/Leaflet/Leaflet.markercluster/archive/0.2.zip) For a Leaflet 0.4 compatible version, [Download the 0.2 release](https://github.com/Leaflet/Leaflet.markercluster/archive/0.2.zip)
@@ -16,6 +18,8 @@ removed link to h1 and indented back 2 spaces all links.
--> -->
## Table of Contents ## Table of Contents
* [Using the plugin](#using-the-plugin) * [Using the plugin](#using-the-plugin)
* [Building, testing and linting scripts](#building-testing-and-linting-scripts)
* [Examples](#examples)
* [Usage](#usage) * [Usage](#usage)
* [Options](#options) * [Options](#options)
* [Defaults](#defaults) * [Defaults](#defaults)
@@ -43,13 +47,26 @@ removed link to h1 and indented back 2 spaces all links.
## Using the plugin ## Using the plugin
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
* [Download the `v1.0.6` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.0.6.zip)
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.0.6/dist/`
* Install with npm: `npm install leaflet.markercluster`
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. See the included examples for usage.
The [realworld example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html) is a good place to start, it uses all of the defaults of the clusterer. The [realworld example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html) is a good place to start, it uses all of the defaults of the clusterer.
Or check out the [custom example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for how to customise the behaviour and appearance of the clusterer Or check out the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for how to customise the behaviour and appearance of the clusterer
### Usage ### Usage
Create a new MarkerClusterGroup, add your markers to it, then add it to the map Create a new MarkerClusterGroup, add your markers to it, then add it to the map
@@ -92,7 +109,7 @@ var markers = L.markerClusterGroup({
} }
}); });
``` ```
Check out the [custom example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for an example of this. Check out the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) for an example of this.
If you need to update the clusters icon (e.g. they are based on markers real-time data), use the method [refreshClusters()](#refreshing-the-clusters-icon). If you need to update the clusters icon (e.g. they are based on markers real-time data), use the method [refreshClusters()](#refreshing-the-clusters-icon).
@@ -106,7 +123,7 @@ If you need to update the clusters icon (e.g. they are based on markers real-tim
#### Other options #### Other options
* **animateAddingMarkers**: If set to true (and `animate` option is also true) then adding individual markers to the MarkerClusterGroup after it has been added to the map will add the marker and animate it into the cluster. Defaults to false as this gives better performance when bulk adding markers. addLayers does not support this, only addLayer with individual Markers. * **animateAddingMarkers**: If set to true (and `animate` option is also true) then adding individual markers to the MarkerClusterGroup after it has been added to the map will add the marker and animate it into the cluster. Defaults to false as this gives better performance when bulk adding markers. addLayers does not support this, only addLayer with individual Markers.
* **disableClusteringAtZoom**: If set, at this zoom level and below, markers will not be clustered. This defaults to disabled. [See Example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html). Note: you may be interested in disabling `spiderfyOnMaxZoom` option when using `disableClusteringAtZoom`. * **disableClusteringAtZoom**: If set, at this zoom level and below, markers will not be clustered. This defaults to disabled. [See Example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld-maxzoom.388.html). Note: you may be interested in disabling `spiderfyOnMaxZoom` option when using `disableClusteringAtZoom`.
* **maxClusterRadius**: The maximum radius that a cluster will cover from the central marker (in pixels). Default 80. Decreasing will make more, smaller clusters. You can also use a function that accepts the current map zoom and returns the maximum cluster radius in pixels. * **maxClusterRadius**: The maximum radius that a cluster will cover from the central marker (in pixels). Default 80. Decreasing will make more, smaller clusters. You can also use a function that accepts the current map zoom and returns the maximum cluster radius in pixels.
* **polygonOptions**: Options to pass when creating the L.Polygon(points, options) to show the bounds of a cluster. Defaults to empty, which lets Leaflet use the [default Path options](http://leafletjs.com/reference.html#path-options). * **polygonOptions**: Options to pass when creating the L.Polygon(points, options) to show the bounds of a cluster. Defaults to empty, which lets Leaflet use the [default Path options](http://leafletjs.com/reference.html#path-options).
* **singleMarkerMode**: If set to true, overrides the icon for all added markers to make them appear as a 1 size cluster. Note: the markers are not replaced by cluster objects, only their icon is replaced. Hence they still react to normal events, and option `disableClusteringAtZoom` does not restore their previous icon (see [#391](https://github.com/Leaflet/Leaflet.markercluster/issues/391)). * **singleMarkerMode**: If set to true, overrides the icon for all added markers to make them appear as a 1 size cluster. Note: the markers are not replaced by cluster objects, only their icon is replaced. Hence they still react to normal events, and option `disableClusteringAtZoom` does not restore their previous icon (see [#391](https://github.com/Leaflet/Leaflet.markercluster/issues/391)).
@@ -217,7 +234,7 @@ markers.on('clusterclick', function (a) {
``` ```
You can also query for the bounding convex polygon. You can also query for the bounding convex polygon.
See [example/marker-clustering-convexhull.html](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-convexhull.html) for a working example. See [example/marker-clustering-convexhull.html](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-convexhull.html) for a working example.
```javascript ```javascript
markers.on('clusterclick', function (a) { markers.on('clusterclick', function (a) {
map.addLayer(L.polygon(a.layer.getConvexHull())); map.addLayer(L.polygon(a.layer.getConvexHull()));
@@ -227,10 +244,12 @@ markers.on('clusterclick', function (a) {
#### Zooming to the bounds of a cluster #### Zooming to the bounds of a cluster
When you receive an event from a cluster you can zoom to its bounds in one easy step. When you receive an event from a cluster you can zoom to its bounds in one easy step.
If all of the markers will appear at a higher zoom level, that zoom level is zoomed to instead. If all of the markers will appear at a higher zoom level, that zoom level is zoomed to instead.
See [marker-clustering-zoomtobounds.html](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-zoomtobounds.html) for a working example. `zoomToBounds` takes an optional argument to pass [options to the resulting `fitBounds` call](http://leafletjs.com/reference.html#map-fitboundsoptions).
See [marker-clustering-zoomtobounds.html](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-zoomtobounds.html) for a working example.
```javascript ```javascript
markers.on('clusterclick', function (a) { markers.on('clusterclick', function (a) {
a.layer.zoomToBounds(); a.layer.zoomToBounds({padding: [20, 20]});
}); });
``` ```
@@ -242,8 +261,8 @@ markers.on('clusterclick', function (a) {
## Handling LOTS of markers ## Handling LOTS of markers
The Clusterer can handle 10,000 or even 50,000 markers (in chrome). IE9 has some issues with 50,000. The Clusterer can handle 10,000 or even 50,000 markers (in chrome). IE9 has some issues with 50,000.
- [realworld 10,000 example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.10000.html) - [realworld 10,000 example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.10000.html)
- [realworld 50,000 example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html) - [realworld 50,000 example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html)
Note: these two examples use the `chunkedLoading` option set to true in order to avoid locking the browser for a long time. Note: these two examples use the `chunkedLoading` option set to true in order to avoid locking the browser for a long time.
@@ -268,3 +287,4 @@ Check also the below sub-plugins:
| [Leaflet.FeatureGroup.SubGroup](https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup) | Creates a Feature Group that adds its child layers into a parent group when added to a map (e.g. through L.Control.Layers). Typical usage is to dynamically add/remove groups of markers from Marker Cluster. | [ghybs](https://github.com/ghybs) | | [Leaflet.FeatureGroup.SubGroup](https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup) | Creates a Feature Group that adds its child layers into a parent group when added to a map (e.g. through L.Control.Layers). Typical usage is to dynamically add/remove groups of markers from Marker Cluster. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.LayerSupport](https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport) | Brings compatibility with L.Control.Layers and other Leaflet plugins. I.e. everything that uses direct calls to map.addLayer and map.removeLayer. | [ghybs](https://github.com/ghybs) | | [Leaflet.MarkerCluster.LayerSupport](https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport) | Brings compatibility with L.Control.Layers and other Leaflet plugins. I.e. everything that uses direct calls to map.addLayer and map.removeLayer. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.Freezable](https://github.com/ghybs/Leaflet.MarkerCluster.Freezable) | Adds the ability to freeze clusters at a specified zoom. E.g. freezing at maxZoom + 1 makes as if clustering was programmatically disabled. | [ghybs](https://github.com/ghybs) | | [Leaflet.MarkerCluster.Freezable](https://github.com/ghybs/Leaflet.MarkerCluster.Freezable) | Adds the ability to freeze clusters at a specified zoom. E.g. freezing at maxZoom + 1 makes as if clustering was programmatically disabled. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.PlacementStrategies](https://github.com/adammertel/Leaflet.MarkerCluster.PlacementStrategies) | Implements new strategies to position clustered markers (eg: clock, concentric circles, ...). Recommended to use with circleMarkers. [Demo](https://adammertel.github.io/Leaflet.MarkerCluster.PlacementStrategies/demo/demo1.html) | [adammertel](https://github.com/adammertel) / [UNIVIE](http://carto.univie.ac.at/) |

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet.markercluster", "name": "leaflet.markercluster",
"version": "0.4.0-hotfix.1", "version": "1.0.6",
"homepage": "https://github.com/Leaflet/Leaflet.markercluster", "homepage": "https://github.com/Leaflet/Leaflet.markercluster",
"authors": [ "authors": [
"Dave Leaver <danzel@localhost.geek.nz>" "Dave Leaver <danzel@localhost.geek.nz>"
@@ -22,6 +22,6 @@
"tests" "tests"
], ],
"dependencies": { "dependencies": {
"leaflet": ">= 0.7.0" "leaflet": ">= 1.0.3"
} }
} }

View File

@@ -69,6 +69,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._queue = []; this._queue = [];
this._childMarkerEventHandlers = {
'dragstart': this._childMarkerDragStart,
'move': this._childMarkerMoved,
'dragend': this._childMarkerDragEnd,
};
// Hook the appropriate animation methods. // Hook the appropriate animation methods.
var animate = L.DomUtil.TRANSITION && this.options.animate; var animate = L.DomUtil.TRANSITION && this.options.animate;
L.extend(this, animate ? this._withAnimation : this._noAnimation); L.extend(this, animate ? this._withAnimation : this._noAnimation);
@@ -85,11 +91,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Don't cluster non point data //Don't cluster non point data
if (!layer.getLatLng) { if (!layer.getLatLng) {
this._nonPointGroup.addLayer(layer); this._nonPointGroup.addLayer(layer);
this.fire('layeradd', { layer: layer });
return this; return this;
} }
if (!this._map) { if (!this._map) {
this._needsClustering.push(layer); this._needsClustering.push(layer);
this.fire('layeradd', { layer: layer });
return this; return this;
} }
@@ -105,6 +113,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} }
this._addLayer(layer, this._maxZoom); this._addLayer(layer, this._maxZoom);
this.fire('layeradd', { layer: layer });
// Refresh bounds and weighted positions. // Refresh bounds and weighted positions.
this._topClusterLevel._recalculateBounds(); this._topClusterLevel._recalculateBounds();
@@ -139,13 +148,15 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Non point layers //Non point layers
if (!layer.getLatLng) { if (!layer.getLatLng) {
this._nonPointGroup.removeLayer(layer); this._nonPointGroup.removeLayer(layer);
this.fire('layerremove', { layer: layer });
return this; return this;
} }
if (!this._map) { if (!this._map) {
if (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) { if (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) {
this._needsRemoving.push(layer); this._needsRemoving.push({ layer: layer, latlng: layer._latlng });
} }
this.fire('layerremove', { layer: layer });
return this; return this;
} }
@@ -160,13 +171,14 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Remove the marker from clusters //Remove the marker from clusters
this._removeLayer(layer, true); this._removeLayer(layer, true);
this.fire('layerremove', { layer: layer });
// Refresh bounds and weighted positions. // Refresh bounds and weighted positions.
this._topClusterLevel._recalculateBounds(); this._topClusterLevel._recalculateBounds();
this._refreshClustersIcons(); this._refreshClustersIcons();
layer.off('move', this._childMarkerMoved, this); layer.off(this._childMarkerEventHandlers, this);
if (this._featureGroup.hasLayer(layer)) { if (this._featureGroup.hasLayer(layer)) {
this._featureGroup.removeLayer(layer); this._featureGroup.removeLayer(layer);
@@ -179,7 +191,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}, },
//Takes an array of markers and adds them in bulk //Takes an array of markers and adds them in bulk
addLayers: function (layersArray) { addLayers: function (layersArray, skipLayerAddEvent) {
if (!L.Util.isArray(layersArray)) { if (!L.Util.isArray(layersArray)) {
return this.addLayer(layersArray); return this.addLayer(layersArray);
} }
@@ -228,6 +240,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Not point data, can't be clustered //Not point data, can't be clustered
if (!m.getLatLng) { if (!m.getLatLng) {
npg.addLayer(m); npg.addLayer(m);
if (!skipLayerAddEvent) {
this.fire('layeradd', { layer: m });
}
continue; continue;
} }
@@ -236,6 +251,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} }
this._addLayer(m, this._maxZoom); this._addLayer(m, this._maxZoom);
if (!skipLayerAddEvent) {
this.fire('layeradd', { layer: m });
}
//If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will //If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will
if (m.__parent) { if (m.__parent) {
@@ -326,8 +344,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._arraySplice(this._needsClustering, m); this._arraySplice(this._needsClustering, m);
npg.removeLayer(m); npg.removeLayer(m);
if (this.hasLayer(m)) { if (this.hasLayer(m)) {
this._needsRemoving.push(m); this._needsRemoving.push({ layer: m, latlng: m._latlng });
} }
this.fire('layerremove', { layer: m });
} }
return this; return this;
} }
@@ -368,10 +387,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!m.__parent) { if (!m.__parent) {
npg.removeLayer(m); npg.removeLayer(m);
this.fire('layerremove', { layer: m });
continue; continue;
} }
this._removeLayer(m, true, true); this._removeLayer(m, true, true);
this.fire('layerremove', { layer: m });
if (fg.hasLayer(m)) { if (fg.hasLayer(m)) {
fg.removeLayer(m); fg.removeLayer(m);
@@ -412,9 +433,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._nonPointGroup.clearLayers(); this._nonPointGroup.clearLayers();
this.eachLayer(function (marker) { this.eachLayer(function (marker) {
marker.off('move', this._childMarkerMoved, this); marker.off(this._childMarkerEventHandlers, this);
delete marker.__parent; delete marker.__parent;
}); }, this);
if (this._map) { if (this._map) {
//Reset _topClusterLevel and the DistanceGrids //Reset _topClusterLevel and the DistanceGrids
@@ -445,14 +466,23 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
eachLayer: function (method, context) { eachLayer: function (method, context) {
var markers = this._needsClustering.slice(), var markers = this._needsClustering.slice(),
needsRemoving = this._needsRemoving, needsRemoving = this._needsRemoving,
i; thisNeedsRemoving, i, j;
if (this._topClusterLevel) { if (this._topClusterLevel) {
this._topClusterLevel.getAllChildMarkers(markers); this._topClusterLevel.getAllChildMarkers(markers);
} }
for (i = markers.length - 1; i >= 0; i--) { for (i = markers.length - 1; i >= 0; i--) {
if (needsRemoving.indexOf(markers[i]) === -1) { thisNeedsRemoving = true;
for (j = needsRemoving.length - 1; j >= 0; j--) {
if (needsRemoving[j].layer === markers[i]) {
thisNeedsRemoving = false;
break;
}
}
if (thisNeedsRemoving) {
method.call(context, markers[i]); method.call(context, markers[i]);
} }
} }
@@ -500,7 +530,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
anArray = this._needsRemoving; anArray = this._needsRemoving;
for (i = anArray.length - 1; i >= 0; i--) { for (i = anArray.length - 1; i >= 0; i--) {
if (anArray[i] === layer) { if (anArray[i].layer === layer) {
return false; return false;
} }
} }
@@ -537,20 +567,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map.on('moveend', showMarker, this); this._map.on('moveend', showMarker, this);
this._map.panTo(layer.getLatLng()); this._map.panTo(layer.getLatLng());
} else { } else {
var moveStart = function () {
this._map.off('movestart', moveStart, this);
moveStart = null;
};
this._map.on('movestart', moveStart, this);
this._map.on('moveend', showMarker, this); this._map.on('moveend', showMarker, this);
this.on('animationend', showMarker, this); this.on('animationend', showMarker, this);
layer.__parent.zoomToBounds(); layer.__parent.zoomToBounds();
if (moveStart) {
//Never started moving, must already be there, probably need clustering however
showMarker.call(this);
}
} }
}, },
@@ -572,9 +591,17 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._maxLat = map.options.crs.projection.MAX_LATITUDE; this._maxLat = map.options.crs.projection.MAX_LATITUDE;
//Restore all the positions as they are in the MCG before removing them
for (i = 0, l = this._needsRemoving.length; i < l; i++) { for (i = 0, l = this._needsRemoving.length; i < l; i++) {
layer = this._needsRemoving[i]; layer = this._needsRemoving[i];
this._removeLayer(layer, true); layer.newlatlng = layer.layer._latlng;
layer.layer._latlng = layer.latlng;
}
//Remove them, then restore their new positions
for (i = 0, l = this._needsRemoving.length; i < l; i++) {
layer = this._needsRemoving[i];
this._removeLayer(layer.layer, true);
layer.layer._latlng = layer.newlatlng;
} }
this._needsRemoving = []; this._needsRemoving = [];
@@ -594,7 +621,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Actually add our markers to the map: //Actually add our markers to the map:
l = this._needsClustering; l = this._needsClustering;
this._needsClustering = []; this._needsClustering = [];
this.addLayers(l); this.addLayers(l, true);
}, },
//Overrides FeatureGroup.onRemove //Overrides FeatureGroup.onRemove
@@ -648,33 +675,57 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
* @private * @private
*/ */
_removeFromGridUnclustered: function (marker, z) { _removeFromGridUnclustered: function (marker, z) {
var map = this._map, var map = this._map,
gridUnclustered = this._gridUnclustered; gridUnclustered = this._gridUnclustered,
minZoom = Math.floor(this._map.getMinZoom());
for (; z >= 0; z--) { for (; z >= minZoom; z--) {
if (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) { if (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) {
break; break;
} }
} }
}, },
_childMarkerMoved: function (e) { _childMarkerDragStart: function (e) {
if (!this._ignoreMove) { e.target.__dragStart = e.target._latlng;
e.target._latlng = e.oldLatLng; },
this.removeLayer(e.target);
e.target._latlng = e.latlng; _childMarkerMoved: function (e) {
this.addLayer(e.target); if (!this._ignoreMove && !e.target.__dragStart) {
var isPopupOpen = e.target._popup && e.target._popup.isOpen();
this._moveChild(e.target, e.oldLatLng, e.latlng);
if (isPopupOpen) {
e.target.openPopup();
}
} }
}, },
_moveChild: function (layer, from, to) {
layer._latlng = from;
this.removeLayer(layer);
layer._latlng = to;
this.addLayer(layer);
},
_childMarkerDragEnd: function (e) {
if (e.target.__dragStart) {
this._moveChild(e.target, e.target.__dragStart, e.target._latlng);
}
delete e.target.__dragStart;
},
//Internal function for removing a marker from everything. //Internal function for removing a marker from everything.
//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions) //dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions)
_removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) { _removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) {
var gridClusters = this._gridClusters, var gridClusters = this._gridClusters,
gridUnclustered = this._gridUnclustered, gridUnclustered = this._gridUnclustered,
fg = this._featureGroup, fg = this._featureGroup,
map = this._map; map = this._map,
minZoom = Math.floor(this._map.getMinZoom());
//Remove the marker from distance clusters it might be in //Remove the marker from distance clusters it might be in
if (removeFromDistanceGrid) { if (removeFromDistanceGrid) {
@@ -693,7 +744,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
cluster._childCount--; cluster._childCount--;
cluster._boundsNeedUpdate = true; cluster._boundsNeedUpdate = true;
if (cluster._zoom < 0) { if (cluster._zoom < minZoom) {
//Top level, do nothing //Top level, do nothing
break; break;
} else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required } else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required
@@ -867,7 +918,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
var newBounds = this._getExpandedVisibleBounds(); var newBounds = this._getExpandedVisibleBounds();
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, newBounds); this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, newBounds);
this._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), newBounds); this._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), newBounds);
this._currentShownBounds = newBounds; this._currentShownBounds = newBounds;
@@ -875,7 +926,8 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}, },
_generateInitialClusters: function () { _generateInitialClusters: function () {
var maxZoom = this._map.getMaxZoom(), var maxZoom = Math.ceil(this._map.getMaxZoom()),
minZoom = Math.floor(this._map.getMinZoom()),
radius = this.options.maxClusterRadius, radius = this.options.maxClusterRadius,
radiusFn = radius; radiusFn = radius;
@@ -886,7 +938,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
radiusFn = function () { return radius; }; radiusFn = function () { return radius; };
} }
if (this.options.disableClusteringAtZoom) { if (this.options.disableClusteringAtZoom !== null) {
maxZoom = this.options.disableClusteringAtZoom - 1; maxZoom = this.options.disableClusteringAtZoom - 1;
} }
this._maxZoom = maxZoom; this._maxZoom = maxZoom;
@@ -894,29 +946,30 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._gridUnclustered = {}; this._gridUnclustered = {};
//Set up DistanceGrids for each zoom //Set up DistanceGrids for each zoom
for (var zoom = maxZoom; zoom >= 0; zoom--) { for (var zoom = maxZoom; zoom >= minZoom; zoom--) {
this._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom)); this._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom));
this._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom)); this._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom));
} }
// Instantiate the appropriate L.MarkerCluster class (animated or not). // Instantiate the appropriate L.MarkerCluster class (animated or not).
this._topClusterLevel = new this._markerCluster(this, -1); this._topClusterLevel = new this._markerCluster(this, minZoom - 1);
}, },
//Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom) //Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom)
_addLayer: function (layer, zoom) { _addLayer: function (layer, zoom) {
var gridClusters = this._gridClusters, var gridClusters = this._gridClusters,
gridUnclustered = this._gridUnclustered, gridUnclustered = this._gridUnclustered,
minZoom = Math.floor(this._map.getMinZoom()),
markerPoint, z; markerPoint, z;
if (this.options.singleMarkerMode) { if (this.options.singleMarkerMode) {
this._overrideMarkerIcon(layer); this._overrideMarkerIcon(layer);
} }
layer.on('move', this._childMarkerMoved, this); layer.on(this._childMarkerEventHandlers, this);
//Find the lowest zoom level to slot this one in //Find the lowest zoom level to slot this one in
for (; zoom >= 0; zoom--) { for (; zoom >= minZoom; zoom--) {
markerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position markerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position
//Try find a cluster close by //Try find a cluster close by
@@ -1005,7 +1058,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split if (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split
this._animationStart(); this._animationStart();
//Remove clusters now off screen //Remove clusters now off screen
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, this._getExpandedVisibleBounds()); this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, this._getExpandedVisibleBounds());
this._animationZoomIn(this._zoom, mapZoom); this._animationZoomIn(this._zoom, mapZoom);
@@ -1129,14 +1182,14 @@ L.MarkerClusterGroup.include({
//Do nothing... //Do nothing...
}, },
_animationZoomIn: function (previousZoomLevel, newZoomLevel) { _animationZoomIn: function (previousZoomLevel, newZoomLevel) {
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel);
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
//We didn't actually animate, but we use this event to mean "clustering animations have finished" //We didn't actually animate, but we use this event to mean "clustering animations have finished"
this.fire('animationend'); this.fire('animationend');
}, },
_animationZoomOut: function (previousZoomLevel, newZoomLevel) { _animationZoomOut: function (previousZoomLevel, newZoomLevel) {
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel);
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
//We didn't actually animate, but we use this event to mean "clustering animations have finished" //We didn't actually animate, but we use this event to mean "clustering animations have finished"
@@ -1156,13 +1209,14 @@ L.MarkerClusterGroup.include({
_animationZoomIn: function (previousZoomLevel, newZoomLevel) { _animationZoomIn: function (previousZoomLevel, newZoomLevel) {
var bounds = this._getExpandedVisibleBounds(), var bounds = this._getExpandedVisibleBounds(),
fg = this._featureGroup, fg = this._featureGroup,
minZoom = Math.floor(this._map.getMinZoom()),
i; i;
this._ignoreMove = true; this._ignoreMove = true;
//Add all children of current clusters to map and remove those clusters from map //Add all children of current clusters to map and remove those clusters from map
this._topClusterLevel._recursively(bounds, previousZoomLevel, 0, function (c) { this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) {
var startPos = c._latlng, var startPos = c._latlng,
markers = c._markers, markers = c._markers,
m; m;
@@ -1212,7 +1266,7 @@ L.MarkerClusterGroup.include({
//Remove the old clusters and close the zoom animation //Remove the old clusters and close the zoom animation
this._enqueue(function () { this._enqueue(function () {
//update the positions of the just added clusters/markers //update the positions of the just added clusters/markers
this._topClusterLevel._recursively(bounds, previousZoomLevel, 0, function (c) { this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) {
fg.removeLayer(c); fg.removeLayer(c);
c.clusterShow(); c.clusterShow();
}); });
@@ -1227,7 +1281,7 @@ L.MarkerClusterGroup.include({
//Need to add markers for those that weren't on the map before but are now //Need to add markers for those that weren't on the map before but are now
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
//Remove markers that were on the map before but won't be now //Remove markers that were on the map before but won't be now
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel, this._getExpandedVisibleBounds()); this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel, this._getExpandedVisibleBounds());
}, },
_animationAddLayer: function (layer, newCluster) { _animationAddLayer: function (layer, newCluster) {
@@ -1264,10 +1318,11 @@ L.MarkerClusterGroup.include({
// Private methods for animated versions. // Private methods for animated versions.
_animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) { _animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) {
var bounds = this._getExpandedVisibleBounds(); var bounds = this._getExpandedVisibleBounds(),
minZoom = Math.floor(this._map.getMinZoom());
//Animate all of the markers in the clusters to move to their cluster center point //Animate all of the markers in the clusters to move to their cluster center point
cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, previousZoomLevel + 1, newZoomLevel); cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, minZoom, previousZoomLevel + 1, newZoomLevel);
var me = this; var me = this;
@@ -1290,8 +1345,8 @@ L.MarkerClusterGroup.include({
m.clusterShow(); m.clusterShow();
} }
} else { } else {
cluster._recursively(bounds, newZoomLevel, 0, function (c) { cluster._recursively(bounds, newZoomLevel, minZoom, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1); c._recursivelyRemoveChildrenFromMap(bounds, minZoom, previousZoomLevel + 1);
}); });
} }
me._animationEnd(); me._animationEnd();
@@ -1367,7 +1422,7 @@ L.MarkerCluster = L.Marker.extend({
}, },
//Zoom to the minimum of showing all of the child markers, or the extents of this cluster //Zoom to the minimum of showing all of the child markers, or the extents of this cluster
zoomToBounds: function () { zoomToBounds: function (fitBoundsOptions) {
var childClusters = this._childClusters.slice(), var childClusters = this._childClusters.slice(),
map = this._group._map, map = this._group._map,
boundsZoom = map.getBoundsZoom(this._bounds), boundsZoom = map.getBoundsZoom(this._bounds),
@@ -1390,7 +1445,7 @@ L.MarkerCluster = L.Marker.extend({
} else if (boundsZoom <= mapZoom) { //If fitBounds wouldn't zoom us down, zoom us down instead } else if (boundsZoom <= mapZoom) { //If fitBounds wouldn't zoom us down, zoom us down instead
this._group._map.setView(this._latlng, mapZoom + 1); this._group._map.setView(this._latlng, mapZoom + 1);
} else { } else {
this._group._map.fitBounds(this._bounds); this._group._map.fitBounds(this._bounds, fitBoundsOptions);
} }
}, },
@@ -1536,7 +1591,7 @@ L.MarkerCluster = L.Marker.extend({
}, },
_recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) { _recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) {
this._recursively(bounds, 0, maxZoom - 1, this._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1,
function (c) { function (c) {
var markers = c._markers, var markers = c._markers,
i, m; i, m;
@@ -1564,8 +1619,8 @@ L.MarkerCluster = L.Marker.extend({
); );
}, },
_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, previousZoomLevel, newZoomLevel) { _recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, mapMinZoom, previousZoomLevel, newZoomLevel) {
this._recursively(bounds, newZoomLevel, 0, this._recursively(bounds, newZoomLevel, mapMinZoom,
function (c) { function (c) {
c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel); c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel);
@@ -1573,7 +1628,7 @@ L.MarkerCluster = L.Marker.extend({
//As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate //As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate
if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) { if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) {
c.clusterShow(); c.clusterShow();
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel); //Immediately remove our children as we are replacing them. TODO previousBounds not bounds c._recursivelyRemoveChildrenFromMap(bounds, mapMinZoom, previousZoomLevel); //Immediately remove our children as we are replacing them. TODO previousBounds not bounds
} else { } else {
c.clusterHide(); c.clusterHide();
} }
@@ -1584,13 +1639,13 @@ L.MarkerCluster = L.Marker.extend({
}, },
_recursivelyBecomeVisible: function (bounds, zoomLevel) { _recursivelyBecomeVisible: function (bounds, zoomLevel) {
this._recursively(bounds, 0, zoomLevel, null, function (c) { this._recursively(bounds, this._group._map.getMinZoom(), zoomLevel, null, function (c) {
c.clusterShow(); c.clusterShow();
}); });
}, },
_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) { _recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) {
this._recursively(bounds, -1, zoomLevel, this._recursively(bounds, this._group._map.getMinZoom() - 1, zoomLevel,
function (c) { function (c) {
if (zoomLevel === c._zoom) { if (zoomLevel === c._zoom) {
return; return;
@@ -1652,9 +1707,9 @@ L.MarkerCluster = L.Marker.extend({
}, },
//exceptBounds: If set, don't remove any markers/clusters in it //exceptBounds: If set, don't remove any markers/clusters in it
_recursivelyRemoveChildrenFromMap: function (previousBounds, zoomLevel, exceptBounds) { _recursivelyRemoveChildrenFromMap: function (previousBounds, mapMinZoom, zoomLevel, exceptBounds) {
var m, i; var m, i;
this._recursively(previousBounds, -1, zoomLevel - 1, this._recursively(previousBounds, mapMinZoom - 1, zoomLevel - 1,
function (c) { function (c) {
//Remove markers at every level //Remove markers at every level
for (i = c._markers.length - 1; i >= 0; i--) { for (i = c._markers.length - 1; i >= 0; i--) {
@@ -2336,6 +2391,9 @@ L.MarkerCluster.include({
continue; continue;
} }
//Close any popup on the marker first, otherwise setting the location of the marker will make the map scroll
m.closePopup();
//Fix up the location to the real one //Fix up the location to the real one
m.setLatLng(m._preSpiderfyLatlng); m.setLatLng(m._preSpiderfyLatlng);
delete m._preSpiderfyLatlng; delete m._preSpiderfyLatlng;

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{ {
"name": "leaflet.markercluster", "name": "leaflet.markercluster",
"repository": "https://github.com/Leaflet/Leaflet.markercluster", "repository": "https://github.com/Leaflet/Leaflet.markercluster",
"version": "1.0.0", "version": "1.0.6",
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet", "description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
"devDependencies": { "devDependencies": {
"jshint": "~2.1.3", "jshint": "~2.1.3",
@@ -10,7 +10,7 @@
"uglify-js": "~2.3.6", "uglify-js": "~2.3.6",
"jake": "~0.5.16", "jake": "~0.5.16",
"magic-string": "^0.7.0", "magic-string": "^0.7.0",
"leaflet": "~1.0.0-rc.1" "leaflet": "~1.0.3"
}, },
"main": "dist/leaflet.markercluster.js", "main": "dist/leaflet.markercluster.js",
"scripts": { "scripts": {

View File

@@ -1,9 +1,25 @@
# Leaflet-providers changelog # Leaflet-providers changelog
## 1.1.17 (2017-06-29)
- Added `maxZoom` for `Hydda` provider [242](https://github.com/leaflet-extras/leaflet-providers/pull/242)
- Fixed `maxZoom` for all layers from the `thunderforest` provider
- Added protocol relativity to the url for `OpenStreetMap.DE` variant.
- Added `OpenStreetMap.BZH` [#255](https://github.com/leaflet-extras/leaflet-providers/pull/255)
- Added `nlmaps` provider [#254](https://github.com/leaflet-extras/leaflet-providers/pull/254)
## 1.1.16 (2016-11-04)
- Updates to reflect changes in [BasemapAT](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=BasemapAT) by [@ximex](https://github.com/ximex), [#232]((https://github.com/leaflet-extras/leaflet-providers/pull/232), [#233]((https://github.com/leaflet-extras/leaflet-providers/pull/233)
- Bump leaflet version in tests and preview to 1.0.1.
- Added some layers from http://justicemap.org [#224](https://github.com/leaflet-extras/leaflet-providers/pull/224).
## 1.1.15 (2016-08-09)
- [Stamen terrain](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Stamen.Terrain) now has world coverage [#223](https://github.com/leaflet-extras/leaflet-providers/pull/223)
- OSM France `maxZoom`: 20 ([#222](https://github.com/leaflet-extras/leaflet-providers/pull/222), fixes [#221](https://github.com/leaflet-extras/leaflet-providers/issues/221))
## 1.1.14 (2016-07-15) ## 1.1.14 (2016-07-15)
- Remove MapQuest, fixes #219 - Remove MapQuest, fixes #219
- Accidently skipped v1.1.12 and v1.1.13 - Accidently skipped v1.1.12 and v1.1.13
## 1.1.11 (2016-06-04) ## 1.1.11 (2016-06-04)
- Added protocol relativity to OSM FR, OSM HOT and Hydda providers (#214, #215). - Added protocol relativity to OSM FR, OSM HOT and Hydda providers (#214, #215).

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet-providers", "name": "leaflet-providers",
"version": "1.1.15", "version": "1.1.17",
"homepage": "https://github.com/leaflet-extras/leaflet-providers", "homepage": "https://github.com/leaflet-extras/leaflet-providers",
"description": "An extension to Leaflet that contains configurations for various free tile providers.", "description": "An extension to Leaflet that contains configurations for various free tile providers.",
"dependencies": { "dependencies": {

View File

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- Leaflet style. REQUIRED! --> <!-- Leaflet style. REQUIRED! -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-rc.1/leaflet.css" /> <link rel="stylesheet" href="http://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<style> <style>
html { height: 100% } html { height: 100% }
body { height: 100%; margin: 0; padding: 0;} body { height: 100%; margin: 0; padding: 0;}
@@ -26,7 +26,7 @@
</div> </div>
<div id="map" class="map"></div> <div id="map" class="map"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-rc.1/leaflet.js"></script> <script src="http://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
<script src="leaflet-providers.js"></script> <script src="leaflet-providers.js"></script>
<script> <script>
var map = L.map('map', { var map = L.map('map', {
@@ -46,7 +46,6 @@
'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'), 'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'),
'Thunderforest Landscape': L.tileLayer.provider('Thunderforest.Landscape'), 'Thunderforest Landscape': L.tileLayer.provider('Thunderforest.Landscape'),
'Hydda Full': L.tileLayer.provider('Hydda.Full'), 'Hydda Full': L.tileLayer.provider('Hydda.Full'),
'MapBox Example': L.tileLayer.provider('MapBox', {id: 'mapbox.streets', accessToken: 'pk.eyJ1IjoiZ3V0ZW55ZSIsImEiOiJmNjJlMDNmYTUyMzNjMzQxZmY4Mzc1ZmFiYmExNjMxOSJ9.xgl1PBwQV9CtwW-usedrcQ'}),
'Stamen Toner': L.tileLayer.provider('Stamen.Toner'), 'Stamen Toner': L.tileLayer.provider('Stamen.Toner'),
'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'), 'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'),
'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'), 'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'),

View File

@@ -110,7 +110,7 @@
} }
}, },
DE: { DE: {
url: 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', url: '//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 18 maxZoom: 18
} }
@@ -144,30 +144,29 @@
} }
}, },
Thunderforest: { Thunderforest: {
url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png', url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: { options: {
attribution: attribution:
'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}', '&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
variant: 'cycle' variant: 'cycle',
apikey: '<insert your api key here>',
maxZoom: 22
}, },
variants: { variants: {
OpenCycleMap: 'cycle', OpenCycleMap: 'cycle',
Transport: { Transport: {
options: { options: {
variant: 'transport', variant: 'transport'
maxZoom: 19
} }
}, },
TransportDark: { TransportDark: {
options: { options: {
variant: 'transport-dark', variant: 'transport-dark'
maxZoom: 19
} }
}, },
SpinalMap: { SpinalMap: {
options: { options: {
variant: 'spinal-map', variant: 'spinal-map'
maxZoom: 11
} }
}, },
Landscape: 'landscape', Landscape: 'landscape',
@@ -201,6 +200,7 @@
Hydda: { Hydda: {
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png', url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 18,
variant: 'full', variant: 'full',
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}' attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}'
}, },
@@ -216,7 +216,9 @@
attribution: attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' + 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
'Map data {attribution.OpenStreetMap}', 'Map data {attribution.OpenStreetMap}',
subdomains: 'abcd' subdomains: 'abcd',
id: 'streets',
accessToken: '<insert your access token here>',
} }
}, },
Stamen: { Stamen: {
@@ -528,7 +530,7 @@
} }
}, },
BasemapAT: { BasemapAT: {
url: '//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}', url: 'https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}',
options: { options: {
maxZoom: 19, maxZoom: 19,
attribution: 'Datenquelle: <a href="www.basemap.at">basemap.at</a>', attribution: 'Datenquelle: <a href="www.basemap.at">basemap.at</a>',
@@ -538,7 +540,12 @@
variant: 'geolandbasemap' variant: 'geolandbasemap'
}, },
variants: { variants: {
basemap: 'geolandbasemap', basemap: {
options: {
maxZoom: 20, // currently only in Vienna
variant: 'geolandbasemap'
}
},
grau: 'bmapgrau', grau: 'bmapgrau',
overlay: 'bmapoverlay', overlay: 'bmapoverlay',
highdpi: { highdpi: {
@@ -549,6 +556,7 @@
}, },
orthofoto: { orthofoto: {
options: { options: {
maxZoom: 20, // currently only in Vienna
variant: 'bmaporthofoto30cm', variant: 'bmaporthofoto30cm',
format: 'jpeg' format: 'jpeg'
} }
@@ -628,6 +636,30 @@
maxZoom: 18, maxZoom: 18,
subdomains: '0123', subdomains: '0123',
} }
},
JusticeMap: {
// Justice Map (http://www.justicemap.org/)
// Visualize race and income data for your community, county and country.
// Includes tools for data journalists, bloggers and community activists.
url: 'http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
options: {
attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
// one of 'county', 'tract', 'block'
size: 'county',
// Bounds for USA, including Alaska and Hawaii
bounds: [[14, -180], [72, -56]]
},
variants: {
income: 'income',
americanIndian: 'indian',
asian: 'asian',
black: 'black',
hispanic: 'hispanic',
multi: 'multi',
nonWhite: 'nonwhite',
white: 'white',
plurality: 'plural'
}
} }
}; };

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "leaflet-providers", "name": "leaflet-providers",
"version": "1.1.15", "version": "1.1.17",
"description": "An extension to Leaflet that contains configurations for various free tile providers.", "description": "An extension to Leaflet that contains configurations for various free tile providers.",
"main": "leaflet-providers.js", "main": "leaflet-providers.js",
"repository": { "repository": {
@@ -9,7 +9,7 @@
}, },
"scripts": { "scripts": {
"test": "npm run lint && npm run testsuite", "test": "npm run lint && npm run testsuite",
"testsuite": "mocha-phantomjs tests/index.html", "testsuite": "phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js tests/index.html",
"lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*", "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*",
"min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
"release": "mversion patch -m" "release": "mversion patch -m"
@@ -26,12 +26,12 @@
], ],
"devDependencies": { "devDependencies": {
"chai": "^2.3.0", "chai": "^2.3.0",
"eslint": "^2.7.0", "eslint": "^3.16.1",
"eslint-plugin-html": "^1.4.0", "eslint-plugin-html": "^2.0.1",
"mocha": "^2.2.4", "mocha": "^2.2.4",
"mocha-phantomjs": "^3.5.3", "mocha-phantomjs-core": "^2.0.1",
"mversion": "^1.3.0", "mversion": "^1.3.0",
"phantomjs": "1.9.7-15", "phantomjs-prebuilt": "^2.1.4",
"uglify-js": "^2.4.15" "uglify-js": "^2.4.15"
}, },
"autoupdate": { "autoupdate": {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -56,10 +56,16 @@
.leaflet-container.leaflet-touch-drag { .leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom; -ms-touch-action: pinch-zoom;
} }
.leaflet-container.leaflet-touch-drag.leaflet-touch-drag { .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none; -ms-touch-action: none;
touch-action: none; touch-action: none;
} }
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile { .leaflet-tile {
filter: inherit; filter: inherit;
visibility: hidden; visibility: hidden;
@@ -303,7 +309,14 @@
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */ /* zoom control */
@@ -312,16 +325,10 @@
font: bold 18px 'Lucida Console', Monaco, monospace; font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px; text-indent: 1px;
} }
.leaflet-control-zoom-out {
font-size: 20px;
}
.leaflet-touch .leaflet-control-zoom-in { .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px; font-size: 22px;
} }
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */ /* layers control */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -19,8 +19,8 @@
}, },
"require":{ "require":{
"php":">=5.4", "php":">=5.4",
"contao-community-alliance/composer-plugin": "~2.4 | ~3.0", "contao-community-alliance/composer-plugin": "~2.4 || ~3.0",
"contao/core-bundle":"~3.5 | ~4.3" "contao/core-bundle":"~3.5 || ~4.3"
}, },
"suggest": { "suggest": {
"netzmacht/contao-leaflet-maps": "Leaflet maps integration into Contao CMS" "netzmacht/contao-leaflet-maps": "Leaflet maps integration into Contao CMS"

View File

@@ -17,7 +17,7 @@
$GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
( (
'name' => 'Leaflet', 'name' => 'Leaflet',
'version' => '1.0.2', 'version' => '1.1.0',
'license' => '<a href="https://github.com/Leaflet/Leaflet/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>', 'license' => '<a href="https://github.com/Leaflet/Leaflet/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
'homepage' => 'http://leafletjs.com', 'homepage' => 'http://leafletjs.com',
'css' => 'assets/leaflet/libs/leaflet/leaflet.min.css', 'css' => 'assets/leaflet/libs/leaflet/leaflet.min.css',
@@ -27,7 +27,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
( (
'name' => 'Leaflet-providers', 'name' => 'Leaflet-providers',
'version' => '1.1.15', 'version' => '1.1.17',
'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>', 'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>',
'homepage' => 'http://leaflet-extras.github.io/leaflet-providers', 'homepage' => 'http://leaflet-extras.github.io/leaflet-providers',
'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js' 'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js'
@@ -36,7 +36,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array
( (
'name' => 'Leaflet.markercluster', 'name' => 'Leaflet.markercluster',
'version' => '1.0.0', 'version' => '1.0.6',
'license' => '<a href="https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt" target="_blank">MIT</a>', 'license' => '<a href="https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt" target="_blank">MIT</a>',
'homepage' => 'https://github.com/Leaflet/Leaflet.markercluster', 'homepage' => 'https://github.com/Leaflet/Leaflet.markercluster',
'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css', 'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css',
@@ -55,7 +55,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-omnivore'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
( (
'name' => 'Leaflet.loading', 'name' => 'Leaflet.loading',
'version' => '0.1.23', 'version' => '0.1.24',
'license' => '<a href="https://github.com/ebrelsford/Leaflet.loading/blob/master/LICENSE" target="_blank">MIT</a>', 'license' => '<a href="https://github.com/ebrelsford/Leaflet.loading/blob/master/LICENSE" target="_blank">MIT</a>',
'homepage' => 'https://github.com/ebrelsford/Leaflet.loading', 'homepage' => 'https://github.com/ebrelsford/Leaflet.loading',
'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css', 'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css',
@@ -65,7 +65,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array
( (
'name' => 'Leaflet.Control.FullScreen', 'name' => 'Leaflet.Control.FullScreen',
'version' => '1.4.2', 'version' => '1.4.3',
'license' => '<a href="https://github.com/brunob/leaflet.fullscreen/blob/master/LICENSE" target="_blank">MIT</a>', 'license' => '<a href="https://github.com/brunob/leaflet.fullscreen/blob/master/LICENSE" target="_blank">MIT</a>',
'homepage' => 'https://github.com/brunob/leaflet.fullscreen', 'homepage' => 'https://github.com/brunob/leaflet.fullscreen',
'css' => 'assets/leaflet/libs/leaflet-fullscreen/Control.FullScreen.min.css', 'css' => 'assets/leaflet/libs/leaflet-fullscreen/Control.FullScreen.min.css',