mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Merge pull request #14750 from ccurrens/leafletjs-marker-icon-types
leaflet: Update marker classes to accept both Icon and DivIcon
This commit is contained in:
commit
dc81dd25e0
4
leaflet/index.d.ts
vendored
4
leaflet/index.d.ts
vendored
@ -1466,7 +1466,7 @@ declare namespace L {
|
||||
export function divIcon(options?: DivIconOptions): DivIcon;
|
||||
|
||||
export interface MarkerOptions extends InteractiveLayerOptions {
|
||||
icon?: Icon;
|
||||
icon?: Icon | DivIcon;
|
||||
clickable?: boolean;
|
||||
draggable?: boolean;
|
||||
keyboard?: boolean;
|
||||
@ -1483,7 +1483,7 @@ declare namespace L {
|
||||
getLatLng(): LatLng;
|
||||
setLatLng(latlng: LatLngExpression): this;
|
||||
setZIndexOffset(offset: number): this;
|
||||
setIcon(icon: Icon): this;
|
||||
setIcon(icon: Icon | DivIcon): this;
|
||||
setOpacity(opacity: number): this;
|
||||
getElement(): HTMLElement;
|
||||
|
||||
|
||||
@ -448,6 +448,17 @@ L.marker([1, 2], {
|
||||
})
|
||||
}).bindPopup('<p>Hi</p>');
|
||||
|
||||
L.marker([1, 2], {
|
||||
icon: L.divIcon({
|
||||
className: 'my-icon-class'
|
||||
})
|
||||
}).setIcon(L.icon({
|
||||
iconUrl: 'my-icon.png'
|
||||
})).setIcon(L.divIcon({
|
||||
className: 'my-div-icon'
|
||||
}));;
|
||||
|
||||
|
||||
L.Util.extend({});
|
||||
L.Util.create({});
|
||||
L.Util.bind(() => {}, {});
|
||||
@ -466,3 +477,4 @@ L.Util.indexOf([], {});
|
||||
L.Util.requestAnimFrame(() => {});
|
||||
L.Util.cancelAnimFrame(1);
|
||||
L.Util.emptyImageUrl;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user