mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
[@types/leaflet.markercluster] add missing chunkInterval option (#34030)
* leaflet.markercluster: add missing chunkInterval option * leaflet.markercluster: bump version number to 1.4
This commit is contained in:
committed by
timolinn
parent
ea79c6c204
commit
6f7df5ecb9
8
types/leaflet.markercluster/index.d.ts
vendored
8
types/leaflet.markercluster/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Leaflet.markercluster 1.0
|
||||
// Type definitions for Leaflet.markercluster 1.4
|
||||
// Project: https://github.com/Leaflet/Leaflet.markercluster
|
||||
// Definitions by: Robert Imig <https://github.com/rimig>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -115,6 +115,12 @@ declare module 'leaflet' {
|
||||
* Time delay (in ms) between consecutive periods of processing for addLayers. Default to 50ms.
|
||||
*/
|
||||
chunkDelay?: number;
|
||||
|
||||
/*
|
||||
* Time interval (in ms) during which addLayers works before pausing to let the rest of the page process.
|
||||
* In particular, this prevents the page from freezing while adding a lot of markers. Defaults to 200ms.
|
||||
*/
|
||||
chunkInterval?: number;
|
||||
}
|
||||
|
||||
class MarkerClusterGroup extends FeatureGroup {
|
||||
|
||||
@@ -26,7 +26,8 @@ markerClusterGroupOptions = {
|
||||
return icon;
|
||||
},
|
||||
chunkedLoading: false,
|
||||
chunkDelay: 100
|
||||
chunkDelay: 100,
|
||||
chunkInterval: 200,
|
||||
};
|
||||
|
||||
markerClusterGroupOptions.iconCreateFunction = (cluster: L.MarkerCluster) => {
|
||||
|
||||
Reference in New Issue
Block a user