forked from Snck3rs/contao-leaflet-libraries
Update Leaflet.markercluster to 1.1.0.
This commit is contained in:
@@ -14,7 +14,7 @@ This package contains following packages:
|
||||
|
||||
- [leaflet 1.2.0](http://leafletjs.com)
|
||||
- [Leaflet-providers 1.1.17](http://leaflet-extras.github.io/leaflet-providers)
|
||||
- [Leaflet.markercluster 1.0.6](https://github.com/Leaflet/Leaflet.markercluster)
|
||||
- [Leaflet.markercluster 1.1.0](https://github.com/Leaflet/Leaflet.markercluster)
|
||||
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
|
||||
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
|
||||
- [Leaflet.Control.FullScreen 1.4.3](https://github.com/brunob/leaflet.fullscreen)
|
||||
|
||||
@@ -48,8 +48,8 @@ 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.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/`
|
||||
* [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`
|
||||
|
||||
In each case, use files in the `dist` folder:
|
||||
@@ -129,7 +129,8 @@ If you need to update the clusters icon (e.g. they are based on markers real-tim
|
||||
* **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.
|
||||
|
||||
@@ -54,6 +54,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
if (!this.options.iconCreateFunction) {
|
||||
this.options.iconCreateFunction = this._defaultIconCreateFunction;
|
||||
}
|
||||
if (!this.options.clusterPane) {
|
||||
this.options.clusterPane = L.Marker.prototype.options.pane;
|
||||
}
|
||||
|
||||
this._featureGroup = L.featureGroup();
|
||||
this._featureGroup.addEventParent(this);
|
||||
@@ -1379,8 +1382,8 @@ L.markerClusterGroup = function (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;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "leaflet.markercluster",
|
||||
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
|
||||
"version": "1.0.6",
|
||||
"version": "1.1.0",
|
||||
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
|
||||
"devDependencies": {
|
||||
"jshint": "~2.1.3",
|
||||
|
||||
@@ -36,7 +36,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array
|
||||
(
|
||||
'name' => 'Leaflet.markercluster',
|
||||
'version' => '1.0.6',
|
||||
'version' => '1.1.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',
|
||||
|
||||
Reference in New Issue
Block a user