Skip to content

Commit ed81eab

Browse files
committed
add leaflet-fullscreen definitions
1 parent 0078ccf commit ed81eab

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path="leaflet-fullscreen.d.ts" />
2+
3+
var map: L.Map;
4+
var icon: L.Control.Fullcircle = new L.control.fullcircle({
5+
position: 'topleft',
6+
title: 'Full Screen',
7+
titleCancel: 'Exit Full Screen',
8+
forceSeparateButton: false,
9+
forcePseudoFullscreen: false
10+
});
11+
12+
icon.addTo(map);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Type definitions for Leaflet.fullscreen v1.3.0
2+
// Project: https://github.com/brunob/leaflet.fullscreen
3+
// Definitions by: William Comartin <https://github.com/wcomartin>
4+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
6+
/// <reference path="../leaflet/leaflet.d.ts" />
7+
8+
declare module L {
9+
10+
namespace Control {
11+
12+
export interface Fullscreen extends L.Control {}
13+
14+
export interface FullscreenOptions {
15+
position: string,
16+
title: string,
17+
titleCancel: string,
18+
forceSeparateButton: boolean,
19+
forcePseudoFullscreen: boolean
20+
}
21+
}
22+
23+
namespace control {
24+
25+
/**
26+
* Creates a fullscreen control.
27+
*/
28+
export function fullscreen(options?: Control.FullscreenOptions): L.Control.Fullscreen;
29+
30+
}
31+
}

0 commit comments

Comments
 (0)