mapbox-gl-controls
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -10,3 +10,3 @@ import Base from '../Base/Base'; | ||
instant: boolean; | ||
constructor(options: CompassControlOptions); | ||
constructor(options?: CompassControlOptions); | ||
insert(): void; | ||
@@ -13,0 +13,0 @@ onAddControl(): void; |
@@ -17,3 +17,3 @@ import Base from '../Base/Base'; | ||
excludedLayerIds: string[]; | ||
constructor(options: LanguageControlOptions); | ||
constructor(options?: LanguageControlOptions); | ||
onAddControl(): void; | ||
@@ -20,0 +20,0 @@ onRemoveControl(): void; |
@@ -47,3 +47,3 @@ import { Marker } from 'mapbox-gl'; | ||
button: Button; | ||
constructor(options: RulerControlOptions); | ||
constructor(options?: RulerControlOptions); | ||
insert(): void; | ||
@@ -50,0 +50,0 @@ draw(): void; |
@@ -14,3 +14,3 @@ import Base from '../Base/Base'; | ||
buttons: Button[]; | ||
constructor(options: StylesControlOptions); | ||
constructor(options?: StylesControlOptions); | ||
insert(): void; | ||
@@ -17,0 +17,0 @@ onAddControl(): void; |
import { LngLat, MapLayerEventType, MapMouseEvent } from 'mapbox-gl'; | ||
import Base from '../Base/Base'; | ||
interface TooltipControlOptions { | ||
/** Triggered each time mouse moved over `layer` option. */ | ||
getContent: (event: MapMouseEvent) => string; | ||
/** Layer id to show the tooltip on hover. If not specified, tooltip will be shown for whole map container */ | ||
layer?: string; | ||
/** Triggered each time mouse moved over `layer` option. */ | ||
getContent: (event: MapMouseEvent) => string; | ||
} | ||
@@ -9,0 +9,0 @@ export default class TooltipControl extends Base { |
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Controls for mapbox-gl", |
@@ -14,3 +14,3 @@ import iconPointer from '../icons/pointer'; | ||
constructor(options: CompassControlOptions) { | ||
constructor(options?: CompassControlOptions) { | ||
super(); | ||
@@ -17,0 +17,0 @@ this.button = new Button(); |
@@ -24,3 +24,3 @@ import getLanguageField from './getLanguageField'; | ||
constructor(options: LanguageControlOptions) { | ||
constructor(options?: LanguageControlOptions) { | ||
super(); | ||
@@ -27,0 +27,0 @@ this.supportedLanguages = options?.supportedLanguages ?? SUPPORTED_LANGUAGES; |
@@ -62,3 +62,3 @@ import mapboxgl, { GeoJSONSource, Marker } from 'mapbox-gl'; | ||
constructor(options: RulerControlOptions) { | ||
constructor(options?: RulerControlOptions) { | ||
super(); | ||
@@ -65,0 +65,0 @@ this.isMeasuring = false; |
@@ -17,3 +17,3 @@ import Base from '../Base/Base'; | ||
constructor(options: StylesControlOptions) { | ||
constructor(options?: StylesControlOptions) { | ||
super(); | ||
@@ -20,0 +20,0 @@ this.styles = options?.styles ?? defaultStyleOptions; |
@@ -5,6 +5,6 @@ import { LngLat, MapLayerEventType, MapMouseEvent } from 'mapbox-gl'; | ||
interface TooltipControlOptions { | ||
/** Triggered each time mouse moved over `layer` option. */ | ||
getContent: (event: MapMouseEvent) => string; | ||
/** Layer id to show the tooltip on hover. If not specified, tooltip will be shown for whole map container */ | ||
layer?: string; | ||
/** Triggered each time mouse moved over `layer` option. */ | ||
getContent: (event: MapMouseEvent) => string; | ||
} | ||
@@ -11,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
108819