@ng-maps/core
Version:
**@ng-maps/core** is a simple, modular and tree-shakable library for displaying google-maps inside an angular application
105 lines (104 loc) • 4.13 kB
TypeScript
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { InfoWindowManager } from '../services/managers/info-window.manager';
import { NgMapsMarkerComponent } from './marker';
import * as i0 from "@angular/core";
/**
* NgMapsInfoWindowComponent renders a info window inside a {@link NgMapsMarkerComponent} or standalone.
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* map-view {
* height: 300px;
* }
* `],
* template: `
* <map-view [latitude]="lat" [longitude]="lng" [zoom]="zoom">
* <map-marker [latitude]="lat" [longitude]="lng" [label]="'M'">
* <map-info-window [disableAutoPan]="true">
* Hi, this is the content of the <strong>info window</strong>
* </map-info-window>
* </map-marker>
* </map-view>
* `
* })
* ```
*/
export declare class NgMapsInfoWindowComponent implements OnDestroy, OnChanges, OnInit {
protected _infoWindowManager: InfoWindowManager<any>;
readonly elementRef: ElementRef<HTMLElement>;
constructor(_infoWindowManager: InfoWindowManager<any>, elementRef: ElementRef<HTMLElement>);
private static _infoWindowOptionsInputs;
/**
* The latitude position of the info window (only usefull if you use it ouside of a {@link
* NgMapsMarkerComponent}).
*/
latitude?: number;
/**
* The longitude position of the info window (only usefull if you use it ouside of a {@link
* NgMapsMarkerComponent}).
*/
longitude?: number;
/**
* Disable auto-pan on open. By default, the info window will pan the map so that it is fully
* visible when it opens.
*/
disableAutoPan?: boolean;
/**
* All InfoWindows are displayed on the map in order of their zIndex, with higher values
* displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed
* according to their latitude, with InfoWindows of lower latitudes appearing in front of
* InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers.
*/
zIndex?: number;
/**
* Maximum width of the infowindow, regardless of content's width. This value is only considered
* if it is set before a call to open. To change the maximum width when changing content, call
* close, update maxWidth, and then open.
*/
maxWidth?: number;
/**
* Holds the marker that is the host of the info window (if available)
*/
hostMarker?: NgMapsMarkerComponent;
/**
* Holds the native element that is used for the info window content.
*/
content?: ElementRef;
/**
* Sets the open state for the InfoWindow. You can also call the open() and close() methods.
*/
isOpen: boolean;
/**
* Emits an event when the info window is closed.
*/
infoWindowClose: EventEmitter<void>;
private _infoWindowAddedToManager;
private _id;
ngOnInit(): void;
/** @internal */
ngOnChanges(changes: SimpleChanges): void;
private _registerEventListeners;
private _updateOpenState;
private _setInfoWindowOptions;
/**
* Opens the info window.
*/
open(event?: any): Promise<void>;
/**
* Closes the info window.
*/
close(): Promise<void>;
/** @internal */
id(): string;
/** @internal */
toString(): string;
/** @internal */
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgMapsInfoWindowComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgMapsInfoWindowComponent, "map-info-window", never, { "latitude": { "alias": "latitude"; "required": false; }; "longitude": { "alias": "longitude"; "required": false; }; "disableAutoPan": { "alias": "disableAutoPan"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, { "infoWindowClose": "infoWindowClose"; }, never, ["*"], false, never>;
}