@ng-maps/core
Version:
**@ng-maps/core** is a simple, modular and tree-shakable library for displaying google-maps inside an angular application
137 lines (136 loc) • 5.64 kB
TypeScript
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { BoundsLiteral } from '../interface/bounds';
import { RectangleOptions } from '../interface/rectangle-options';
import { RectangleManager } from '../services/managers/rectangle-manager';
import * as i0 from "@angular/core";
export declare class NgMapsRectangleDirective implements OnInit, OnChanges, OnDestroy, RectangleOptions {
private _manager;
constructor(_manager: RectangleManager);
private static _mapOptions;
/**
* The north position of the rectangle (required).
*/
north?: number;
/**
* The east position of the rectangle (required).
*/
east?: number;
/**
* The south position of the rectangle (required).
*/
south?: number;
/**
* The west position of the rectangle (required).
*/
west?: number;
/**
* Indicates whether this Rectangle handles mouse events. Defaults to true.
*/
clickable: boolean;
/**
* If set to true, the user can drag this rectangle over the map. Defaults to false.
*/
draggable: boolean;
/**
* If set to true, the user can edit this rectangle by dragging the control points shown at
* the center and around the circumference of the rectangle. Defaults to false.
*/
editable: boolean;
/**
* The fill color. All CSS3 colors are supported except for extended named colors.
*/
fillColor?: string;
/**
* The fill opacity between 0.0 and 1.0.
*/
fillOpacity?: number;
/**
* The stroke color. All CSS3 colors are supported except for extended named colors.
*/
strokeColor?: string;
/**
* The stroke opacity between 0.0 and 1.0
*/
strokeOpacity?: number;
/**
* The stroke position. Defaults to CENTER.
* This property is not supported on Internet Explorer 8 and earlier.
*/
strokePosition: 'CENTER' | 'INSIDE' | 'OUTSIDE';
/**
* The stroke width in pixels.
*/
strokeWeight: number;
/**
* Whether this rectangle is visible on the map. Defaults to true.
*/
visible: boolean;
/**
* The zIndex compared to other polys.
*/
zIndex?: number;
/**
* This event is fired when the rectangle's is changed.
*/
boundsChange: EventEmitter<google.maps.LatLngBoundsLiteral>;
/**
* This event emitter gets emitted when the user clicks on the rectangle.
*/
rectangleClick: EventEmitter<MouseEvent>;
/**
* This event emitter gets emitted when the user clicks on the rectangle.
*/
rectangleDblClick: EventEmitter<MouseEvent>;
/**
* This event is repeatedly fired while the user drags the rectangle.
*/
drag: EventEmitter<MouseEvent>;
/**
* This event is fired when the user stops dragging the rectangle.
*/
dragEnd: EventEmitter<MouseEvent>;
/**
* This event is fired when the user starts dragging the rectangle.
*/
dragStart: EventEmitter<MouseEvent>;
/**
* This event is fired when the DOM mousedown event is fired on the rectangle.
*/
mouseDown: EventEmitter<MouseEvent>;
/**
* This event is fired when the DOM mousemove event is fired on the rectangle.
*/
mouseMove: EventEmitter<MouseEvent>;
/**
* This event is fired on rectangle mouseout.
*/
mouseOut: EventEmitter<MouseEvent>;
/**
* This event is fired on rectangle mouseover.
*/
mouseOver: EventEmitter<MouseEvent>;
/**
* This event is fired when the DOM mouseup event is fired on the rectangle.
*/
mouseUp: EventEmitter<MouseEvent>;
/**
* This event is fired when the rectangle is right-clicked on.
*/
rightClick: EventEmitter<MouseEvent>;
private _rectangleAddedToManager;
private subscription;
/** @internal */
ngOnInit(): void;
/** @internal */
ngOnChanges(changes: SimpleChanges): void;
private _updateRectangleOptionsChanges;
private _registerEventListeners;
/** @internal */
ngOnDestroy(): void;
/**
* Gets the LatLngBounds of this Rectangle.
*/
getBounds(): Promise<BoundsLiteral | null>;
static ɵfac: i0.ɵɵFactoryDeclaration<NgMapsRectangleDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgMapsRectangleDirective, "map-rectangle", never, { "north": { "alias": "north"; "required": false; }; "east": { "alias": "east"; "required": false; }; "south": { "alias": "south"; "required": false; }; "west": { "alias": "west"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; "draggable": { "alias": "rectangleDraggable"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "fillColor": { "alias": "fillColor"; "required": false; }; "fillOpacity": { "alias": "fillOpacity"; "required": false; }; "strokeColor": { "alias": "strokeColor"; "required": false; }; "strokeOpacity": { "alias": "strokeOpacity"; "required": false; }; "strokePosition": { "alias": "strokePosition"; "required": false; }; "strokeWeight": { "alias": "strokeWeight"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, { "boundsChange": "boundsChange"; "rectangleClick": "rectangleClick"; "rectangleDblClick": "rectangleDblClick"; "drag": "drag"; "dragEnd": "dragEnd"; "dragStart": "dragStart"; "mouseDown": "mouseDown"; "mouseMove": "mouseMove"; "mouseOut": "mouseOut"; "mouseOver": "mouseOver"; "mouseUp": "mouseUp"; "rightClick": "rightClick"; }, never, never, false, never>;
}