Compare commits

...

19 Commits

Author SHA1 Message Date
David Molineus
79fdad5ca3 Include leaflet.pm as new library. 2018-01-26 19:55:36 +01:00
David Molineus
c5b72d2c15 Update leaflet-markercluster to v1.3.0. 2018-01-26 19:44:04 +01:00
David Molineus
69b500a5fc Update leaflet to v1.3.1. 2018-01-26 15:01:39 +01:00
David Molineus
cbce9420ec Update Leaflet.markercluster to 1.1.0. 2017-10-17 09:59:20 +02:00
David Molineus
193c920e1b Update minified style. 2017-10-17 09:56:35 +02:00
David Molineus
ed594cfdd1 Update control geocoder to v1.5.5. 2017-10-17 09:56:11 +02:00
David Molineus
a2cdfddcc6 Use leaflet 1.2.0. 2017-10-17 09:51:56 +02:00
David Molineus
1f5add1d27 Update gitignore and gitattributes. 2017-10-09 15:13:24 +02:00
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
David Molineus
6203fdc45d Support Contao 4.3. 2017-01-18 11:07:59 +01:00
David Molineus
383bff4d6d Merge tag '1.0.2' 2016-11-25 09:53:50 +01:00
47 changed files with 11446 additions and 10367 deletions

10
.gitattributes vendored Normal file
View File

@@ -0,0 +1,10 @@
.check-author.yml export-ignore
.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
.travis.yml export-ignore
build.default.properties export-ignore
build.xml export-ignore
phpunit.xml.dist export-ignore
/tests export-ignore
/specs export-ignore

26
.gitignore vendored
View File

@@ -1,8 +1,24 @@
/vendor/
/bin/
/.tx/
/node_modules/
# OS
.DS_Store
Thumbs.db
.directory
coverage.xml
# IDEs
.buildpath
.project
.settings/
.build/
.external*/
.idea/
nbproject/
# composer related
vendor/
composer.lock
# build
build/
build.properties
# Translations
.tx

View File

@@ -12,14 +12,15 @@ Contao CMS.
This package contains following packages:
- [leaflet 1.0.2](http://leafletjs.com)
- [Leaflet-providers 1.1.15](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.0.0](https://github.com/Leaflet/Leaflet.markercluster)
- [leaflet 1.3.1](http://leafletjs.com)
- [Leaflet-providers 1.1.17](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.3.0](https://github.com/Leaflet/Leaflet.markercluster)
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
- [Leaflet.loading 0.1.23](https://github.com/ebrelsford/Leaflet.loading)
- [Leaflet.Control.FullScreen 1.4.2](https://github.com/brunob/leaflet.fullscreen)
- [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder)
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
- [Leaflet.Control.FullScreen 1.4.3](https://github.com/brunob/leaflet.fullscreen)
- [Leaflet Control Geocoder 1.5.5](https://github.com/perliedman/leaflet-control-geocoder)
- [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers)
- [leaflet.pm 0.23.1](https://github.com/codeofsumit/leaflet.pm)
- [osmtogeojson 2.2.12](https://github.com/tyrasd/osmtogeojson)
- [spin.js 2.3.2](http://fgnass.github.io/spin.js)
@@ -33,12 +34,23 @@ You can install this package via composer.
$ php composer.phar require netzmacht/contao-leaflet-libraries:~1.0
```
When releasing the first stable version of
[netzmacht/contao-leaflet-maps](https://github.com/netzmacht/contao-leaflet-maps) the version number gonna be the same
as the included leaflet library.
If you use Contao 4 without the managed edition, you also have to register the module as a bundle.
```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
-------
As this package is just a meta package to provide the libraries, the licenses of each library have to be accepted. They
are unter the MIT or BSD license.
are under the MIT or BSD license.

View File

@@ -132,17 +132,19 @@ module.exports = {
_geocode: function(suggest) {
var requestCount = ++this._requestCount,
mode = suggest ? 'suggest' : 'geocode';
mode = suggest ? 'suggest' : 'geocode',
eventData = {input: this._input.value};
this._lastGeocode = this._input.value;
if (!suggest) {
this._clearResults();
}
this.fire('start' + mode);
this.fire('start' + mode, eventData);
this.options.geocoder[mode](this._input.value, function(results) {
if (requestCount === this._requestCount) {
this.fire('finish' + mode);
eventData.results = results;
this.fire('finish' + mode, eventData);
this._geocodeResult(results, suggest);
}
}, this);
@@ -608,18 +610,26 @@ var L = (typeof window !== "undefined" ? window['L'] : typeof global !== "undefi
module.exports = {
"class": L.Class.extend({
options: {
serviceUrl: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/'
serviceUrl: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/',
geocodingQueryParams: {},
reverseQueryParams: {}
},
initialize: function(accessToken, options) {
L.setOptions(this, options);
this._accessToken = accessToken;
this.options.geocodingQueryParams.access_token = accessToken;
this.options.reverseQueryParams.access_token = accessToken;
},
geocode: function(query, cb, context) {
Util.getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', {
access_token: this._accessToken
}, function(data) {
var params = this.options.geocodingQueryParams;
if (typeof params.proximity !== 'undefined'
&& params.proximity.hasOwnProperty('lat')
&& params.proximity.hasOwnProperty('lng'))
{
params.proximity = params.proximity.lng + ',' + params.proximity.lat;
}
Util.getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', params, function(data) {
var results = [],
loc,
latLng,
@@ -628,7 +638,7 @@ module.exports = {
for (var i = 0; i <= data.features.length - 1; i++) {
loc = data.features[i];
latLng = L.latLng(loc.center.reverse());
if(loc.hasOwnProperty('bbox'))
if (loc.hasOwnProperty('bbox'))
{
latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse()));
}
@@ -653,9 +663,7 @@ module.exports = {
},
reverse: function(location, scale, cb, context) {
Util.getJSON(this.options.serviceUrl + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', {
access_token: this._accessToken
}, function(data) {
Util.getJSON(this.options.serviceUrl + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', this.options.reverseQueryParams, function(data) {
var results = [],
loc,
latLng,
@@ -664,7 +672,7 @@ module.exports = {
for (var i = 0; i <= data.features.length - 1; i++) {
loc = data.features[i];
latLng = L.latLng(loc.center.reverse());
if(loc.hasOwnProperty('bbox'))
if (loc.hasOwnProperty('bbox'))
{
latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse()));
}
@@ -1043,6 +1051,9 @@ module.exports = {
results.push({
name: this._deocodeFeatureName(f),
html: this.options.htmlTemplate ?
this.options.htmlTemplate(f)
: undefined,
center: latLng,
bbox: bbox,
properties: f.properties

File diff suppressed because one or more lines are too long

View File

@@ -160,7 +160,7 @@ An object that represents a result from a geocoding query.
| Property | Type | Description |
| ---------- | ---------------- | ------------------------------------- |
| name | String | Name of found location |
| bounds | L.LatLngBounds | The bounds of the location |
| bbox | L.LatLngBounds | The bounds of the location |
| center | L.LatLng | The center coordinate of the location |
| icon | String | URL for icon representing result; optional |
| html | String | (optional) HTML formatted representation of the name |

View File

@@ -1,14 +1,14 @@
{
"name": "leaflet-control-geocoder",
"version": "1.5.4",
"version": "1.5.5",
"homepage": "https://github.com/perliedman/leaflet-control-geocoder",
"authors": [
"Per Liedman <per@liedman.net>"
],
"description": "Extendable geocoder with builtin OSM/Nominatim support",
"main": [
"Control.Geocoder.js",
"Control.Geocoder.css",
"dist/Control.Geocoder.js",
"dist/Control.Geocoder.css",
"images/geocoder.png",
"images/throbber.gif"
],

View File

@@ -1,6 +1,6 @@
{
"name": "leaflet-control-geocoder",
"version": "1.5.4",
"version": "1.5.5",
"description": "Extendable geocoder with builtin support for Nominatim, Bing, Google, Mapbox, Photon, What3Words, MapQuest, Mapzen, HERE",
"main": "dist/Control.Geocoder.js",
"scripts": {

View File

@@ -155,7 +155,7 @@ source : http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugi
fullScreenApi.isFullScreen = function () {
switch (this.prefix) {
case '':
return document.fullScreen;
return document.fullscreen;
case 'webkit':
return document.webkitIsFullScreen;
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 t,n="leaflet-control-zoom-fullscreen",l="";return t=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,l,t,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),t},_createButton:function(t,n,l,r,i,s){return this.link=L.DomUtil.create("a",n,r),this.link.href="#",this.link.title=t,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 t=this._map;t._exitFired=!1,t._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.removeClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.addClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var t=this._map;e.isFullScreen(t)||t._exitFired||(t.fire("exitFullscreen"),t._exitFired=!0,t._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:""},t="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)e.supportsFullScreen=!0;else{for(var n=0,l=t.length;n<l;n++)if(e.prefix=t[n],void 0!==document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}void 0!==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 t=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(t)})}),window.fullScreenApi=e}();

View File

@@ -44,8 +44,8 @@ __Events and options__:
L.control.fullscreen({
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
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
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
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
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",
"version": "1.4.2",
"version": "1.4.3",
"homepage": "https://github.com/brunob/leaflet.fullscreen",
"license": "MIT",
"authors": [

View File

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

View File

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

View File

@@ -5,14 +5,16 @@
}
.leaflet-control-loading,
.leaflet-control-zoom a.leaflet-control-loading ,
.leaflet-control-zoomslider a.leaflet-control-loading {
.leaflet-control-zoom a.leaflet-control-loading,
.leaflet-control-zoomslider a.leaflet-control-loading,
.leaflet-control-layer-container {
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 {
.leaflet-control-zoomslider a.leaflet-control-loading.is-loading,
.leaflet-control-layer-container.is-loading {
display: block;
}

View File

@@ -71,8 +71,9 @@
}
else {
// 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);
if (this.options.spinjs) {
this._spinner = new Spinner(this.options.spin).spin();
@@ -156,6 +157,7 @@
_showIndicator: function() {
// Show loading indicator
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 (!this.options.separate) {
@@ -171,6 +173,7 @@
_hideIndicator: function() {
// Hide loading indicator
L.DomUtil.removeClass(this._indicator, 'is-loading');
L.DomUtil.removeClass(this._indicatorContainer, 'is-loading');
// If zoomControl exists, make the zoom-out button last
if (!this.options.separate) {

View File

@@ -1 +1 @@
.leaflet-control-loading:empty{background-image:url('data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0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G2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkEAAoACAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAAKAAkALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');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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BElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');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

@@ -4,19 +4,22 @@ Leaflet.loading
Leaflet.loading is a simple loading control for [Leaflet][]. An unobtrusive
loading indicator is added below the zoom control if one exists. The indicator
is visible when tiles are loading or when other data is loading, as indicated by
firing custom events on a map. The indicator can be an image, or a [spin.js][]
firing custom events on a map. The indicator can be an image, or a [spin.js][]
spinner (image-less).
## Usage
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
`loadingControl: true` in its options.
Include `Control.Loading.js` and `Control.Loading.css`, then create a map with
`loadingControl: true` in its options.
By default, Leaflet.loading includes a base64-encoded animagted loading image in
By default, Leaflet.loading includes a base64-encoded animagted loading image in
`Control.Loading.css`. You can customize this by changing `background-image` for
the selector `.leaflet-control-loading`. The simplest case would be adding a 16
x 16 loading gif in `.leaflet-control-loading`.
@@ -28,13 +31,14 @@ initializing the control.
Whichever method you use, make sure you only use one.
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
else is occurring, simply fire the `dataloading` event on your map when you
begin loading and `dataload` when you are finished loading. The control tracks
the number of concurrent loaders, so it is your responsibility to ensure that
the `dataloading` and `dataload` are called symmetrically.
else is occurring, fire the `dataloading` event on your map when you begin
loading and `dataload` when you are finished loading. Please note that there is
[an issue](https://github.com/ebrelsford/Leaflet.loading/issues/26) with the
way this control tracks these events and that this will be re-worked in a
future version.
### Options
@@ -43,20 +47,22 @@ the `dataloading` and `dataload` are called symmetrically.
- **separate**: (boolean) Whether the control should be separate from the zoom
control or not, defaults to false.
- **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.
- **spinjs**: (boolean) Enable the use of [spin.js][]. Optional, defaults to
- **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
`false`
- **spin**: (object) A [spin.js][] options object. Optional, defaults to
- **spin**: (object) A [spin.js][] options object. Optional, defaults to
```
{
{
lines: 7,
length: 3,
width: 3,
radius: 5,
rotate: 13,
top: "83%"
top: "83%"
}
```

View File

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

View File

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

View File

@@ -3,9 +3,111 @@ Leaflet.markercluster
(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
@@ -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)
##0.3 (2013-12-18)
## 0.3 (2013-12-18)
### Improvements

View File

@@ -5,6 +5,8 @@ Provides Beautiful Animated Marker Clustering functionality for [Leaflet](http:/
*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.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)
@@ -16,6 +18,8 @@ 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)
@@ -43,13 +47,26 @@ removed link to h1 and indented back 2 spaces all links.
## Using the plugin
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
* [Download the `v1.1.0` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.1.0.zip)
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.1.0/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.
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.
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
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](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html) 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
@@ -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).
@@ -106,13 +123,14 @@ If you need to update the clusters icon (e.g. they are based on markers real-tim
#### 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.
* **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.
* **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)).
* **spiderLegPolylineOptions**: Allows you to specify [PolylineOptions](http://leafletjs.com/reference.html#polyline-options) to style spider legs. By default, they are `{ weight: 1.5, color: '#222', opacity: 0.5 }`.
* **spiderfyDistanceMultiplier**: Increase from 1 to increase the distance away from the center that spiderfied markers are placed. Use if you are using big marker icons (Default: 1).
* **iconCreateFunction**: Function used to create the cluster icon [See default as example](https://github.com/Leaflet/Leaflet.markercluster/blob/15ed12654acdc54a4521789c498e4603fe4bf781/src/MarkerClusterGroup.js#L542).
* **iconCreateFunction**: Function used to create the cluster icon. See [the default implementation](https://github.com/Leaflet/Leaflet.markercluster/blob/15ed12654acdc54a4521789c498e4603fe4bf781/src/MarkerClusterGroup.js#L542) or the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html).
* **clusterPane**: Map pane where the cluster icons will be added. Defaults to L.Marker's default (currently 'markerPane'). [See the pane example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-pane.html).
#### Chunked addLayers options
Options for the [addLayers](#bulk-adding-and-removing-markers) method. See [#357](https://github.com/Leaflet/Leaflet.markercluster/issues/357) for explanation on how the chunking works.
@@ -217,7 +235,7 @@ markers.on('clusterclick', function (a) {
```
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
markers.on('clusterclick', function (a) {
map.addLayer(L.polygon(a.layer.getConvexHull()));
@@ -227,10 +245,12 @@ markers.on('clusterclick', function (a) {
#### 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.
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
markers.on('clusterclick', function (a) {
a.layer.zoomToBounds();
a.layer.zoomToBounds({padding: [20, 20]});
});
```
@@ -242,8 +262,8 @@ markers.on('clusterclick', function (a) {
## Handling LOTS of markers
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 50,000 example](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html)
- [realworld 10,000 example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.10000.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.
@@ -268,3 +288,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.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.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",
"version": "0.4.0-hotfix.1",
"version": "1.0.6",
"homepage": "https://github.com/Leaflet/Leaflet.markercluster",
"authors": [
"Dave Leaver <danzel@localhost.geek.nz>"
@@ -22,6 +22,6 @@
"tests"
],
"dependencies": {
"leaflet": ">= 0.7.0"
"leaflet": ">= 1.0.3"
}
}

View File

@@ -1,17 +1,25 @@
/*
Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
https://github.com/Leaflet/Leaflet.markercluster
(c) 2012-2013, Dave Leaver, smartrak
*/
(function (window, document, undefined) {/*
* Leaflet.markercluster 1.3.0+master.5b36e91,
* Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
* https://github.com/Leaflet/Leaflet.markercluster
* (c) 2012-2017, Dave Leaver, smartrak
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.Leaflet = global.Leaflet || {}, global.Leaflet.markercluster = global.Leaflet.markercluster || {})));
}(this, (function (exports) { 'use strict';
/*
* L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within
*/
L.MarkerClusterGroup = L.FeatureGroup.extend({
var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
options: {
maxClusterRadius: 80, //A cluster will cover at most this many pixels from its center
iconCreateFunction: null,
clusterPane: L.Marker.prototype.options.pane,
spiderfyOnMaxZoom: true,
showCoverageOnHover: true,
@@ -69,6 +77,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._queue = [];
this._childMarkerEventHandlers = {
'dragstart': this._childMarkerDragStart,
'move': this._childMarkerMoved,
'dragend': this._childMarkerDragEnd,
};
// Hook the appropriate animation methods.
var animate = L.DomUtil.TRANSITION && this.options.animate;
L.extend(this, animate ? this._withAnimation : this._noAnimation);
@@ -85,11 +99,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Don't cluster non point data
if (!layer.getLatLng) {
this._nonPointGroup.addLayer(layer);
this.fire('layeradd', { layer: layer });
return this;
}
if (!this._map) {
this._needsClustering.push(layer);
this.fire('layeradd', { layer: layer });
return this;
}
@@ -105,6 +121,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}
this._addLayer(layer, this._maxZoom);
this.fire('layeradd', { layer: layer });
// Refresh bounds and weighted positions.
this._topClusterLevel._recalculateBounds();
@@ -139,13 +156,15 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Non point layers
if (!layer.getLatLng) {
this._nonPointGroup.removeLayer(layer);
this.fire('layerremove', { layer: layer });
return this;
}
if (!this._map) {
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;
}
@@ -160,13 +179,14 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Remove the marker from clusters
this._removeLayer(layer, true);
this.fire('layerremove', { layer: layer });
// Refresh bounds and weighted positions.
this._topClusterLevel._recalculateBounds();
this._refreshClustersIcons();
layer.off('move', this._childMarkerMoved, this);
layer.off(this._childMarkerEventHandlers, this);
if (this._featureGroup.hasLayer(layer)) {
this._featureGroup.removeLayer(layer);
@@ -179,7 +199,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
},
//Takes an array of markers and adds them in bulk
addLayers: function (layersArray) {
addLayers: function (layersArray, skipLayerAddEvent) {
if (!L.Util.isArray(layersArray)) {
return this.addLayer(layersArray);
}
@@ -228,6 +248,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Not point data, can't be clustered
if (!m.getLatLng) {
npg.addLayer(m);
if (!skipLayerAddEvent) {
this.fire('layeradd', { layer: m });
}
continue;
}
@@ -236,6 +259,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}
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 (m.__parent) {
@@ -326,8 +352,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._arraySplice(this._needsClustering, m);
npg.removeLayer(m);
if (this.hasLayer(m)) {
this._needsRemoving.push(m);
this._needsRemoving.push({ layer: m, latlng: m._latlng });
}
this.fire('layerremove', { layer: m });
}
return this;
}
@@ -368,10 +395,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!m.__parent) {
npg.removeLayer(m);
this.fire('layerremove', { layer: m });
continue;
}
this._removeLayer(m, true, true);
this.fire('layerremove', { layer: m });
if (fg.hasLayer(m)) {
fg.removeLayer(m);
@@ -412,9 +441,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._nonPointGroup.clearLayers();
this.eachLayer(function (marker) {
marker.off('move', this._childMarkerMoved, this);
marker.off(this._childMarkerEventHandlers, this);
delete marker.__parent;
});
}, this);
if (this._map) {
//Reset _topClusterLevel and the DistanceGrids
@@ -445,14 +474,23 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
eachLayer: function (method, context) {
var markers = this._needsClustering.slice(),
needsRemoving = this._needsRemoving,
i;
thisNeedsRemoving, i, j;
if (this._topClusterLevel) {
this._topClusterLevel.getAllChildMarkers(markers);
}
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]);
}
}
@@ -472,7 +510,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Overrides LayerGroup.getLayer, WARNING: Really bad performance
getLayer: function (id) {
var result = null;
id = parseInt(id, 10);
this.eachLayer(function (l) {
@@ -500,7 +538,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
anArray = this._needsRemoving;
for (i = anArray.length - 1; i >= 0; i--) {
if (anArray[i] === layer) {
if (anArray[i].layer === layer) {
return false;
}
}
@@ -510,7 +548,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Zoom down to show the given layer (spiderfying if necessary) then calls the callback
zoomToShowLayer: function (layer, callback) {
if (typeof callback !== 'function') {
callback = function () {};
}
@@ -537,20 +575,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map.on('moveend', showMarker, this);
this._map.panTo(layer.getLatLng());
} 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.on('animationend', showMarker, this);
layer.__parent.zoomToBounds();
if (moveStart) {
//Never started moving, must already be there, probably need clustering however
showMarker.call(this);
}
}
},
@@ -572,9 +599,17 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
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++) {
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 = [];
@@ -594,7 +629,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Actually add our markers to the map:
l = this._needsClustering;
this._needsClustering = [];
this.addLayers(l);
this.addLayers(l, true);
},
//Overrides FeatureGroup.onRemove
@@ -648,33 +683,57 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
* @private
*/
_removeFromGridUnclustered: function (marker, z) {
var map = this._map,
gridUnclustered = this._gridUnclustered;
var map = this._map,
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))) {
break;
}
}
},
_childMarkerMoved: function (e) {
if (!this._ignoreMove) {
e.target._latlng = e.oldLatLng;
this.removeLayer(e.target);
_childMarkerDragStart: function (e) {
e.target.__dragStart = e.target._latlng;
},
e.target._latlng = e.latlng;
this.addLayer(e.target);
_childMarkerMoved: function (e) {
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.
//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions)
_removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) {
var gridClusters = this._gridClusters,
gridUnclustered = this._gridUnclustered,
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
if (removeFromDistanceGrid) {
@@ -693,7 +752,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
cluster._childCount--;
cluster._boundsNeedUpdate = true;
if (cluster._zoom < 0) {
if (cluster._zoom < minZoom) {
//Top level, do nothing
break;
} else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required
@@ -867,7 +926,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
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._currentShownBounds = newBounds;
@@ -875,10 +934,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
},
_generateInitialClusters: function () {
var maxZoom = this._map.getMaxZoom(),
var maxZoom = Math.ceil(this._map.getMaxZoom()),
minZoom = Math.floor(this._map.getMinZoom()),
radius = this.options.maxClusterRadius,
radiusFn = radius;
//If we just set maxClusterRadius to a single number, we need to create
//a simple function to return that number. Otherwise, we just have to
//use the function we've passed in.
@@ -886,37 +946,38 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
radiusFn = function () { return radius; };
}
if (this.options.disableClusteringAtZoom) {
if (this.options.disableClusteringAtZoom !== null) {
maxZoom = this.options.disableClusteringAtZoom - 1;
}
this._maxZoom = maxZoom;
this._gridClusters = {};
this._gridUnclustered = {};
//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._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom));
}
// 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)
_addLayer: function (layer, zoom) {
var gridClusters = this._gridClusters,
gridUnclustered = this._gridUnclustered,
minZoom = Math.floor(this._map.getMinZoom()),
markerPoint, z;
if (this.options.singleMarkerMode) {
this._overrideMarkerIcon(layer);
}
layer.on('move', this._childMarkerMoved, this);
layer.on(this._childMarkerEventHandlers, this);
//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
//Try find a cluster close by
@@ -1005,7 +1066,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split
this._animationStart();
//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);
@@ -1129,14 +1190,14 @@ L.MarkerClusterGroup.include({
//Do nothing...
},
_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());
//We didn't actually animate, but we use this event to mean "clustering animations have finished"
this.fire('animationend');
},
_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());
//We didn't actually animate, but we use this event to mean "clustering animations have finished"
@@ -1156,13 +1217,14 @@ L.MarkerClusterGroup.include({
_animationZoomIn: function (previousZoomLevel, newZoomLevel) {
var bounds = this._getExpandedVisibleBounds(),
fg = this._featureGroup,
fg = this._featureGroup,
minZoom = Math.floor(this._map.getMinZoom()),
i;
this._ignoreMove = true;
//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,
markers = c._markers,
m;
@@ -1212,7 +1274,7 @@ L.MarkerClusterGroup.include({
//Remove the old clusters and close the zoom animation
this._enqueue(function () {
//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);
c.clusterShow();
});
@@ -1227,7 +1289,7 @@ L.MarkerClusterGroup.include({
//Need to add markers for those that weren't on the map before but are now
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
//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) {
@@ -1264,10 +1326,11 @@ L.MarkerClusterGroup.include({
// Private methods for animated versions.
_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
cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, previousZoomLevel + 1, newZoomLevel);
cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, minZoom, previousZoomLevel + 1, newZoomLevel);
var me = this;
@@ -1290,8 +1353,8 @@ L.MarkerClusterGroup.include({
m.clusterShow();
}
} else {
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
cluster._recursively(bounds, newZoomLevel, minZoom, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, minZoom, previousZoomLevel + 1);
});
}
me._animationEnd();
@@ -1320,12 +1383,13 @@ L.markerClusterGroup = function (options) {
return new L.MarkerClusterGroup(options);
};
var MarkerCluster = L.MarkerCluster = L.Marker.extend({
options: L.Icon.prototype.options,
L.MarkerCluster = L.Marker.extend({
initialize: function (group, zoom, a, b) {
L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), { icon: this });
L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0),
{ icon: this, pane: group.options.clusterPane });
this._group = group;
this._zoom = zoom;
@@ -1367,7 +1431,7 @@ L.MarkerCluster = L.Marker.extend({
},
//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(),
map = this._group._map,
boundsZoom = map.getBoundsZoom(this._bounds),
@@ -1390,7 +1454,7 @@ L.MarkerCluster = L.Marker.extend({
} else if (boundsZoom <= mapZoom) { //If fitBounds wouldn't zoom us down, zoom us down instead
this._group._map.setView(this._latlng, mapZoom + 1);
} else {
this._group._map.fitBounds(this._bounds);
this._group._map.fitBounds(this._bounds, fitBoundsOptions);
}
},
@@ -1536,7 +1600,7 @@ L.MarkerCluster = L.Marker.extend({
},
_recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) {
this._recursively(bounds, 0, maxZoom - 1,
this._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1,
function (c) {
var markers = c._markers,
i, m;
@@ -1564,8 +1628,8 @@ L.MarkerCluster = L.Marker.extend({
);
},
_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, previousZoomLevel, newZoomLevel) {
this._recursively(bounds, newZoomLevel, 0,
_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, mapMinZoom, previousZoomLevel, newZoomLevel) {
this._recursively(bounds, newZoomLevel, mapMinZoom,
function (c) {
c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel);
@@ -1573,7 +1637,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
if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) {
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 {
c.clusterHide();
}
@@ -1584,13 +1648,13 @@ L.MarkerCluster = L.Marker.extend({
},
_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();
});
},
_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) {
this._recursively(bounds, -1, zoomLevel,
this._recursively(bounds, this._group._map.getMinZoom() - 1, zoomLevel,
function (c) {
if (zoomLevel === c._zoom) {
return;
@@ -1652,9 +1716,9 @@ L.MarkerCluster = L.Marker.extend({
},
//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;
this._recursively(previousBounds, -1, zoomLevel - 1,
this._recursively(previousBounds, mapMinZoom - 1, zoomLevel - 1,
function (c) {
//Remove markers at every level
for (i = c._markers.length - 1; i >= 0; i--) {
@@ -1719,8 +1783,6 @@ L.MarkerCluster = L.Marker.extend({
}
});
/*
* Extends L.Marker to include two extra methods: clusterHide and clusterShow.
*
@@ -1745,10 +1807,6 @@ L.Marker.include({
});
L.DistanceGrid = function (cellSize) {
this._cellSize = cellSize;
this._sqCellSize = cellSize * cellSize;
@@ -1842,7 +1900,8 @@ L.DistanceGrid.prototype = {
for (k = 0, len = cell.length; k < len; k++) {
obj = cell[k];
dist = this._sqDist(objectPoint[L.Util.stamp(obj)], point);
if (dist < closestDistSq) {
if (dist < closestDistSq ||
dist <= closestDistSq && closest === null) {
closestDistSq = dist;
closest = obj;
}
@@ -1855,7 +1914,8 @@ L.DistanceGrid.prototype = {
},
_getCoord: function (x) {
return Math.floor(x / this._cellSize);
var coord = Math.floor(x / this._cellSize);
return isFinite(coord) ? coord : x;
},
_sqDist: function (p, p2) {
@@ -1865,7 +1925,6 @@ L.DistanceGrid.prototype = {
}
};
/* Copyright (c) 2012 the authors listed at the following URL, and/or
the authors of referenced articles or incorporated external code:
http://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256
@@ -2032,7 +2091,6 @@ L.MarkerCluster.include({
}
});
//This code is 100% based on https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
//Huge thanks to jawj for implementing it first to make my job easy :-)
@@ -2040,7 +2098,7 @@ L.MarkerCluster.include({
_2PI: Math.PI * 2,
_circleFootSeparation: 25, //related to circumference of circle
_circleStartAngle: Math.PI / 6,
_circleStartAngle: 0,
_spiralFootSeparation: 28, //related to size of spiral (experiment!)
_spiralLengthStart: 11,
@@ -2092,9 +2150,11 @@ L.MarkerCluster.include({
res = [],
i, angle;
legLength = Math.max(legLength, 35); // Minimum distance to get outside the cluster icon.
res.length = count;
for (i = count - 1; i >= 0; i--) {
for (i = 0; i < count; i++) { // Clockwise, like spiral.
angle = this._circleStartAngle + i * angleStep;
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
}
@@ -2114,9 +2174,13 @@ L.MarkerCluster.include({
res.length = count;
// Higher index, closer position to cluster center.
for (i = count - 1; i >= 0; i--) {
for (i = count; i >= 0; i--) {
// Skip the first position, so that we are already farther from center and we avoid
// being under the default cluster icon (especially important for Circle Markers).
if (i < count) {
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
}
angle += separation / legLength + i * 0.0005;
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
legLength += lengthFactor / angle;
}
return res;
@@ -2336,6 +2400,9 @@ L.MarkerCluster.include({
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
m.setLatLng(m._preSpiderfyLatlng);
delete m._preSpiderfyLatlng;
@@ -2500,7 +2567,6 @@ L.MarkerClusterGroup.include({
}
});
/**
* Adds 1 public method to MCG and 1 to L.Marker to facilitate changing
* markers' icon options and refreshing their icon and their parent clusters
@@ -2612,5 +2678,8 @@ L.Marker.include({
}
});
exports.MarkerClusterGroup = MarkerClusterGroup;
exports.MarkerCluster = MarkerCluster;
}(window, document));
})));
//# sourceMappingURL=leaflet.markercluster-src.js.map

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

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

View File

@@ -0,0 +1,122 @@
.marker-icon,
.marker-icon:focus {
background-color: #ffffff;
border: 1px solid #3388ff;
border-radius: 50%;
margin: -8px 0 0 -8px !important;
width: 14px !important;
height: 14px !important;
outline: 0;
transition: opacity ease 0.3s;
}
.marker-icon-middle,
.marker-icon-middle:focus {
opacity: 0.7;
margin: -6px 0 0 -6px !important;
width: 10px !important;
height: 10px !important;
}
.leaflet-pm-draggable {
cursor: move !important;
}
.cursor-marker {
cursor: crosshair;
pointer-events: none;
display: none;
}
.cursor-marker.visible {
display: block !important;
}
.leaflet-pm-invalid {
stroke: red;
transition: fill ease 0s, stroke ease 0s;
}
.rect-style-marker,
.rect-start-marker {
opacity: 0;
}
.rect-style-marker.visible,
.rect-start-marker.visible {
opacity: 1 !important;
}
.hidden {
display: none;
}
.leaflet-pm-toolbar {
}
.leaflet-pm-toolbar .leaflet-buttons-control-button {
padding: 3px;
box-sizing: border-box;
}
.leaflet-pm-toolbar .control-icon {
width: 100%;
height: 100%;
box-sizing: border-box;
opacity: .8;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
.leaflet-pm-toolbar .leaflet-pm-icon-marker {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAZCAYAAADTyxWqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGl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QyAyMDE1IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+J3lsvQAAAFpJREFUeNrsljsOACAIQ1sPyGG9IJq4IKOfQdNuhuQ90gUJwBHi7sRGSE48DuaA5uFqIq/gcpgr6rFNZo2Pkjq3A0tbrOp6RRJIIIEEEjxxcD68yae/LU2AAQC7fSa9H1rL6AAAAABJRU5ErkJggg==);
background-size: 90%;
}
.leaflet-pm-toolbar .leaflet-pm-icon-drag {
/*background-image: url('../assets/icons/drag.png');*/
}
.leaflet-pm-toolbar .leaflet-pm-icon-delete {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAaCAYAAAC3g3x9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zM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1sBLAS+8U+G952k5u4egmtvzHC/SIoWgkwXwdGZ5qrOMa63x9gkbfjgoZ8anJt0EGAAZUK4sZc82dAAAAABJRU5ErkJggg==);
background-size: 80%;
background-position: 4px center;
}
.leaflet-pm-toolbar .leaflet-pm-icon-cut {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAXCAYAAAD+4+QTAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkNDNkM0RTY5ODUzNzExRTU4RTQwRkQwODFEOUZEMEE3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cursor: pointer;
background-color: #f4f4f4;
}
.leaflet-buttons-control-button.active {
background-color: #f4f4f4;
}
.leaflet-buttons-control-button.active > .control-icon {
opacity: .5;
}
.leaflet-buttons-control-text-hide {
display: none;
}

1
assets/leaflet-pm/leaflet.pm.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,25 @@
# 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)
- Remove MapQuest, fixes #219
- Accidently skipped v1.1.12 and v1.1.13
- Remove MapQuest, fixes #219
- Accidently skipped v1.1.12 and v1.1.13
## 1.1.11 (2016-06-04)
- Added protocol relativity to OSM FR, OSM HOT and Hydda providers (#214, #215).

View File

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

View File

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- 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>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0;}
@@ -26,7 +26,7 @@
</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>
var map = L.map('map', {
@@ -46,7 +46,6 @@
'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'),
'Thunderforest Landscape': L.tileLayer.provider('Thunderforest.Landscape'),
'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 Terrain': L.tileLayer.provider('Stamen.Terrain'),
'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'),

View File

@@ -110,7 +110,7 @@
}
},
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: {
maxZoom: 18
}
@@ -144,30 +144,29 @@
}
},
Thunderforest: {
url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png',
url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: {
attribution:
'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
variant: 'cycle'
variant: 'cycle',
apikey: '<insert your api key here>',
maxZoom: 22
},
variants: {
OpenCycleMap: 'cycle',
Transport: {
options: {
variant: 'transport',
maxZoom: 19
variant: 'transport'
}
},
TransportDark: {
options: {
variant: 'transport-dark',
maxZoom: 19
variant: 'transport-dark'
}
},
SpinalMap: {
options: {
variant: 'spinal-map',
maxZoom: 11
variant: 'spinal-map'
}
},
Landscape: 'landscape',
@@ -201,6 +200,7 @@
Hydda: {
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
variant: 'full',
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}'
},
@@ -216,7 +216,9 @@
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
'Map data {attribution.OpenStreetMap}',
subdomains: 'abcd'
subdomains: 'abcd',
id: 'streets',
accessToken: '<insert your access token here>',
}
},
Stamen: {
@@ -528,7 +530,7 @@
}
},
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: {
maxZoom: 19,
attribution: 'Datenquelle: <a href="www.basemap.at">basemap.at</a>',
@@ -538,7 +540,12 @@
variant: 'geolandbasemap'
},
variants: {
basemap: 'geolandbasemap',
basemap: {
options: {
maxZoom: 20, // currently only in Vienna
variant: 'geolandbasemap'
}
},
grau: 'bmapgrau',
overlay: 'bmapoverlay',
highdpi: {
@@ -549,6 +556,7 @@
},
orthofoto: {
options: {
maxZoom: 20, // currently only in Vienna
variant: 'bmaporthofoto30cm',
format: 'jpeg'
}
@@ -628,6 +636,30 @@
maxZoom: 18,
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",
"version": "1.1.15",
"version": "1.1.17",
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
"main": "leaflet-providers.js",
"repository": {
@@ -9,7 +9,7 @@
},
"scripts": {
"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/*",
"min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
"release": "mversion patch -m"
@@ -26,12 +26,12 @@
],
"devDependencies": {
"chai": "^2.3.0",
"eslint": "^2.7.0",
"eslint-plugin-html": "^1.4.0",
"eslint": "^3.16.1",
"eslint-plugin-html": "^2.0.1",
"mocha": "^2.2.4",
"mocha-phantomjs": "^3.5.3",
"mocha-phantomjs-core": "^2.0.1",
"mversion": "^1.3.0",
"phantomjs": "1.9.7-15",
"phantomjs-prebuilt": "^2.1.4",
"uglify-js": "^2.4.15"
},
"autoupdate": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

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

@@ -47,6 +47,7 @@
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer {
max-width: none !important;
max-height: none !important;
}
.leaflet-container.leaflet-touch-zoom {
@@ -55,11 +56,20 @@
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-drag {
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-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 {
filter: inherit;
visibility: hidden;
@@ -303,7 +313,14 @@
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 */
@@ -312,16 +329,10 @@
font: bold 18px 'Lucida Console', Monaco, monospace;
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;
}
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */
@@ -359,6 +370,7 @@
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {

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

View File

@@ -17,7 +17,7 @@
$GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
(
'name' => 'Leaflet',
'version' => '1.0.2',
'version' => '1.3.1',
'license' => '<a href="https://github.com/Leaflet/Leaflet/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
'homepage' => 'http://leafletjs.com',
'css' => 'assets/leaflet/libs/leaflet/leaflet.min.css',
@@ -27,7 +27,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
(
'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>',
'homepage' => 'http://leaflet-extras.github.io/leaflet-providers',
'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
(
'name' => 'Leaflet.markercluster',
'version' => '1.0.0',
'version' => '1.3.0',
'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',
'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css',
@@ -55,7 +55,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-omnivore'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
(
'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>',
'homepage' => 'https://github.com/ebrelsford/Leaflet.loading',
'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
(
'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>',
'homepage' => 'https://github.com/brunob/leaflet.fullscreen',
'css' => 'assets/leaflet/libs/leaflet-fullscreen/Control.FullScreen.min.css',
@@ -75,7 +75,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array
(
'name' => 'Leaflet Control Geocoder',
'version' => '1.5.4',
'version' => '1.5.5',
'license' => '<a href="https://github.com/perliedman/leaflet-control-geocoder/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
'homepage' => 'https://github.com/perliedman/leaflet-control-geocoder',
'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.css',
@@ -92,6 +92,16 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-extra-markers'] = array
'javascript' => 'assets/leaflet/libs/leaflet-extra-markers/js/leaflet.extra-markers.min.js'
);
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-pm'] = array
(
'name' => 'leaflet.pm',
'version' => '0.23.1',
'license' => '<a href="https://github.com/codeofsumit/leaflet.pm/blob/develop/LICENSE" target="_blank">MIT</a>',
'homepage' => 'https://github.com/codeofsumit/leaflet.pm',
'css' => 'assets/leaflet/libs/leaflet-pm/leaflet.pm.css',
'javascript' => 'assets/leaflet/libs/leaflet-pm/leaflet.pm.min.js'
);
$GLOBALS['LEAFLET_LIBRARIES']['osmtogeojson'] = array
(
'name' => 'osmtogeojson',