mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-01 11:50:54 +08:00
Merge pull request #1 from jmblab/feature/leaflet-missing-map-eachLayer
Add L.Map.eachLayer method typing
This commit is contained in:
@@ -131,6 +131,7 @@ var layer = L.tileLayer("http://{s}.example.net/{x}/{y}/{z}.png");
|
||||
|
||||
map.addLayer(layer);
|
||||
map.addLayer(layer, false);
|
||||
map.eachLayer(l => {});
|
||||
|
||||
map.removeLayer(layer);
|
||||
map.hasLayer(layer);
|
||||
@@ -423,4 +424,4 @@ var zoomCtrl = L.control.zoom({
|
||||
position: "topleft",
|
||||
zoomInText: '+',
|
||||
zoomOutText: '-'
|
||||
});
|
||||
});
|
||||
Vendored
+8
-2
@@ -516,7 +516,7 @@ declare module L {
|
||||
function (options?: ControlOptions): Control;
|
||||
}
|
||||
|
||||
namespace control {
|
||||
export namespace control {
|
||||
|
||||
/**
|
||||
* Creates a zoom control.
|
||||
@@ -2441,6 +2441,12 @@ declare namespace L {
|
||||
*/
|
||||
options: Map.MapOptions;
|
||||
|
||||
/**
|
||||
* Iterates over the layers of the map, optionally specifying context
|
||||
* of the iterator function.
|
||||
*/
|
||||
eachLayer(fn: (layer: ILayer) => void, context?: any): Map;
|
||||
|
||||
////////////////
|
||||
////////////////
|
||||
addEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): Map;
|
||||
@@ -3261,7 +3267,7 @@ declare namespace L {
|
||||
off(eventMap?: any, context?: any): Path;
|
||||
}
|
||||
|
||||
namespace Path {
|
||||
export namespace Path {
|
||||
/**
|
||||
* True if SVG is used for vector rendering (true for most modern browsers).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user