mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 20:02:05 +08:00
Add missing options to MarkerCluster.LayerSupport
This commit is contained in:
@@ -24,10 +24,18 @@ declare global { namespace L {
|
||||
checkOut(layers: Layer | Layer[]): this;
|
||||
}
|
||||
}
|
||||
|
||||
interface MarkerClusterGroupLayerSupportOptions extends MarkerClusterGroupOptions {
|
||||
/**
|
||||
* Buffer single addLayer and removeLayer requests for efficiency.
|
||||
*/
|
||||
singleAddRemoveBufferDuration: number;
|
||||
}
|
||||
|
||||
namespace markerClusterGroup {
|
||||
/**
|
||||
* Create a layer support marker cluster group, optionally given marker cluster group options.
|
||||
*/
|
||||
function layerSupport(options?: MarkerClusterGroupOptions): MarkerClusterGroup.LayerSupport;
|
||||
function layerSupport(options?: MarkerClusterGroupLayerSupportOptions): MarkerClusterGroup.LayerSupport;
|
||||
}
|
||||
} }
|
||||
|
||||
@@ -3,7 +3,7 @@ import L = require("leaflet.markercluster.layersupport");
|
||||
const polylineOptions: L.PolylineOptions = {};
|
||||
const icon: L.Icon = L.icon({ iconUrl: 'foo' });
|
||||
|
||||
let markerClusterGroupOptions: L.MarkerClusterGroupOptions = {};
|
||||
let markerClusterGroupOptions: L.MarkerClusterGroupLayerSupportOptions;
|
||||
markerClusterGroupOptions = {
|
||||
showCoverageOnHover: true,
|
||||
zoomToBoundsOnClick: false,
|
||||
@@ -25,7 +25,8 @@ markerClusterGroupOptions = {
|
||||
return icon;
|
||||
},
|
||||
chunkedLoading: false,
|
||||
chunkDelay: 100
|
||||
chunkDelay: 100,
|
||||
singleAddRemoveBufferDuration: 200,
|
||||
};
|
||||
|
||||
markerClusterGroupOptions.iconCreateFunction = (cluster: L.MarkerCluster) => {
|
||||
|
||||
Reference in New Issue
Block a user