mirror of
https://github.com/netzmacht/contao-leaflet-libraries.git
synced 2025-11-28 11:04:07 +01:00
Update Leaflet.markercluster to 1.1.0.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user