// Type definitions for Leaflet.label 0.2 // Project: https://github.com/Leaflet/Leaflet.label // Definitions by: Wim Looman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import * as L from 'leaflet'; declare module 'leaflet' { interface IconOptions { labelAnchor?: Point; } interface PathOptions { labelAnchor?: Point; } interface CircleMarkerOptions { labelAnchor?: Point; } interface Marker { showLabel(): Marker; hideLabel(): Marker; setLabelNoHide(noHide: boolean): void; bindLabel(content: string, options?: LabelOptions): Marker; unbindLabel(): Marker; updateLabelContent(content: string): void; getLabel(): Label; setOpacity(opacity: number, labelHasSemiTransparency: boolean): void; } interface CircleMarker { showLabel(): CircleMarker; hideLabel(): CircleMarker; setLabelNoHide(noHide: boolean): void; bindLabel(content: string, options?: LabelOptions): CircleMarker; unbindLabel(): CircleMarker; updateLabelContent(content: string): void; getLabel(): Label; } interface FeatureGroup { clearLayers(): FeatureGroup; bindLabel(content: string, options?: LabelOptions): FeatureGroup; unbindLabel(): FeatureGroup; updateLabelContent(content: string): FeatureGroup; } interface Path { bindLabel(content: string, options?: LabelOptions): Path; unbindLabel(): Path; updateLabelContent(content: string): void; } interface LabelOptions { className?: string; clickable?: boolean; direction?: string; // 'left' | 'right' | 'auto'; pane?: string; noHide?: boolean; offset?: Point; opacity?: number; zoomAnimation?: boolean; } interface LabelStatic extends ClassStatic { new(options?: LabelOptions): Label; } const Label: LabelStatic; interface Label extends IEventPowered