leaflet#ControlOptions TypeScript Examples

The following examples show how to use leaflet#ControlOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChatControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
constructor(options: ControlOptions) {
		super(options);
	}
Example #2
Source File: ChatControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
declare options: ControlOptions
Example #3
Source File: LinkControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
constructor(options: ControlOptions) {
		super(options);
	}
Example #4
Source File: LinkControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
declare options: ControlOptions
Example #5
Source File: LoginControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
constructor(options: ControlOptions) {
		super(options);

		this._button = DomUtil.create('button',
				'leaflet-control-bottom leaflet-control-button leaflet-control-login') as HTMLButtonElement;

		this._button.type = 'button';

		this._button.addEventListener('click', async e => {
			e.stopPropagation();
			e.preventDefault();

			await this.handleClick();
		});

		//Open login on ArrowRight from button
		DomEvent.on(this._button,'keydown', async (e: Event) => {
			if ((e as KeyboardEvent).key === 'ArrowRight') {
				e.stopPropagation();
				e.preventDefault();

				await this.handleClick();
			}
		});

		watch(this.loggedIn, () => {
			this.update();
		});

		const visibleModal = computed(() => this.store.state.ui.visibleModal);

		watch(visibleModal, (newValue, oldValue) => {
			this._button.setAttribute('aria-expanded', (newValue === 'login').toString());

			if(this._map && !newValue && oldValue === 'login') {
				this._button.focus();
			}
		});

		this.update();
	}
Example #6
Source File: LoginControl.ts    From LiveAtlas with Apache License 2.0 5 votes vote down vote up
declare options: ControlOptions;