@ng-maps/core
Version:
**@ng-maps/core** is a simple, modular and tree-shakable library for displaying google-maps inside an angular application
143 lines (142 loc) • 5.86 kB
TypeScript
import { AfterContentInit, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChange } from '@angular/core';
import { Observable, ReplaySubject } from 'rxjs';
import { MarkerIcon } from '../interface/marker-icon';
import { MarkerOptions } from '../interface/marker-options';
import { FitBoundsAccessor, FitBoundsDetails } from '../services/fit-bounds';
import { MarkerManager } from '../services/managers/marker.manager';
import { NgMapsInfoWindowComponent } from './info-window';
import * as i0 from "@angular/core";
/**
* NgMapsMarkerComponent renders a map marker inside a {@link NgMapsViewComponent}.
*
* @example
* <agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom">
* <agm-marker [latitude]="lat" [longitude]="lng" label="M"></agm-marker>
* </agm-map>
*/
export declare class NgMapsMarkerComponent implements OnDestroy, OnChanges, AfterContentInit, FitBoundsAccessor, MarkerOptions {
private markerManager;
/**
* The latitude position of the marker.
*/
latitude?: number;
/**
* The longitude position of the marker.
*/
longitude?: number;
/**
* The title of the marker.
*/
title?: string;
/**
* The label (a single uppercase character) for the marker.
*/
label?: string | google.maps.MarkerLabel;
/**
* If true, the marker can be dragged. Default value is false.
*/
draggable: boolean;
/**
* Icon (the URL of the image) for the foreground.
* Can also be a MarkerIcon (google.maps.Icon in Google Maps Javascript api)
*
* @see <a href="https://developers.google.com/maps/documentation/javascript/reference/marker#Icon">google.maps.Icon</a>
*/
iconUrl?: string | google.maps.Icon;
icon: MarkerIcon | string | google.maps.Icon | null | undefined | google.maps.Symbol;
/**
* If true, the marker is visible
*/
visible: boolean;
/**
* Whether to automatically open the child info window when the marker is clicked.
*/
openInfoWindow: boolean;
/**
* The marker's opacity between 0.0 and 1.0.
*/
opacity: number;
/**
* Marker optimize flag. If it is false then it prevent duplicate rendering.
* Default it is true
*/
optimized: boolean;
/**
* All markers are displayed on the map in order of their zIndex, with higher values displaying in
* front of markers with lower values. By default, markers are displayed according to their
* vertical position on screen, with lower markers appearing in front of markers further up the
* screen.
*/
zIndex: number;
/**
* If true, the marker can be clicked. Default value is true.
*/
clickable: boolean;
/**
* Which animation to play when marker is added to a map.
* This can be 'BOUNCE' or 'DROP'
*/
animation?: 'BOUNCE' | 'DROP' | null;
/**
* This event emitter gets emitted when the user clicks on the marker.
*/
markerClick: EventEmitter<NgMapsMarkerComponent>;
/**
* This event is fired when the user rightclicks on the marker.
*/
markerRightClick: EventEmitter<void>;
/**
* This event is fired when the user starts dragging the marker.
*/
dragStart: EventEmitter<google.maps.MapMouseEvent>;
/**
* This event is repeatedly fired while the user drags the marker.
*/
drag: EventEmitter<google.maps.MapMouseEvent>;
/**
* This event is fired when the user stops dragging the marker.
*/
dragEnd: EventEmitter<google.maps.MapMouseEvent>;
/**
* This event is fired when the user mouses over the marker.
*/
mouseOver: EventEmitter<google.maps.MapMouseEvent>;
/**
* This event is fired when the user mouses outside the marker.
*/
mouseOut: EventEmitter<google.maps.MapMouseEvent>;
/**
* @internal
*/
infoWindow: QueryList<NgMapsInfoWindowComponent>;
private _markerAddedToManger;
private _id;
private subscription;
protected readonly _fitBoundsDetails$: ReplaySubject<FitBoundsDetails>;
constructor(markerManager: MarkerManager);
/**
* @internal
*/
ngAfterContentInit(): void;
private handleInfoWindowUpdate;
/**
* @internal
*/
ngOnChanges(changes: {
[key: string]: SimpleChange;
}): void;
/**
* @internal
*/
getFitBoundsDetails$(): Observable<FitBoundsDetails>;
protected _updateFitBoundsDetails(): void;
protected _addEventListeners(): void;
/** @internal */
id(): string;
/** @internal */
toString(): string;
/** @internal */
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgMapsMarkerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgMapsMarkerComponent, "map-marker", never, { "latitude": { "alias": "latitude"; "required": false; }; "longitude": { "alias": "longitude"; "required": false; }; "title": { "alias": "title"; "required": false; }; "label": { "alias": "label"; "required": false; }; "draggable": { "alias": "markerDraggable"; "required": false; }; "iconUrl": { "alias": "iconUrl"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "openInfoWindow": { "alias": "openInfoWindow"; "required": false; }; "opacity": { "alias": "opacity"; "required": false; }; "optimized": { "alias": "optimized"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "clickable": { "alias": "markerClickable"; "required": false; }; }, { "markerClick": "markerClick"; "dragStart": "dragStart"; "drag": "drag"; "dragEnd": "dragEnd"; "mouseOver": "mouseOver"; "mouseOut": "mouseOut"; "markerRightClick": "markerRightClick"; }, ["infoWindow"], ["*"], false, never>;
}