UNPKG

4.25 kBTypeScriptView Raw
1/// <reference types="googlemaps" />
2import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChange } from '@angular/core';
3import { RectangleManager } from '../services/managers/rectangle-manager';
4export declare class AgmRectangle implements OnInit, OnChanges, OnDestroy {
5 private _manager;
6 /**
7 * The north position of the rectangle (required).
8 */
9 north: number;
10 /**
11 * The east position of the rectangle (required).
12 */
13 east: number;
14 /**
15 * The south position of the rectangle (required).
16 */
17 south: number;
18 /**
19 * The west position of the rectangle (required).
20 */
21 west: number;
22 /**
23 * Indicates whether this Rectangle handles mouse events. Defaults to true.
24 */
25 clickable: boolean;
26 /**
27 * If set to true, the user can drag this rectangle over the map. Defaults to false.
28 */
29 draggable: boolean;
30 /**
31 * If set to true, the user can edit this rectangle by dragging the control points shown at
32 * the center and around the circumference of the rectangle. Defaults to false.
33 */
34 editable: boolean;
35 /**
36 * The fill color. All CSS3 colors are supported except for extended named colors.
37 */
38 fillColor: string;
39 /**
40 * The fill opacity between 0.0 and 1.0.
41 */
42 fillOpacity: number;
43 /**
44 * The stroke color. All CSS3 colors are supported except for extended named colors.
45 */
46 strokeColor: string;
47 /**
48 * The stroke opacity between 0.0 and 1.0
49 */
50 strokeOpacity: number;
51 /**
52 * The stroke position. Defaults to CENTER.
53 * This property is not supported on Internet Explorer 8 and earlier.
54 */
55 strokePosition: keyof typeof google.maps.StrokePosition;
56 /**
57 * The stroke width in pixels.
58 */
59 strokeWeight: number;
60 /**
61 * Whether this rectangle is visible on the map. Defaults to true.
62 */
63 visible: boolean;
64 /**
65 * The zIndex compared to other polys.
66 */
67 zIndex: number;
68 /**
69 * This event is fired when the rectangle's is changed.
70 */
71 boundsChange: EventEmitter<google.maps.LatLngBoundsLiteral>;
72 /**
73 * This event emitter gets emitted when the user clicks on the rectangle.
74 */
75 rectangleClick: EventEmitter<google.maps.MouseEvent>;
76 /**
77 * This event emitter gets emitted when the user clicks on the rectangle.
78 */
79 rectangleDblClick: EventEmitter<google.maps.MouseEvent>;
80 /**
81 * This event is repeatedly fired while the user drags the rectangle.
82 */
83 drag: EventEmitter<google.maps.MouseEvent>;
84 /**
85 * This event is fired when the user stops dragging the rectangle.
86 */
87 dragEnd: EventEmitter<google.maps.MouseEvent>;
88 /**
89 * This event is fired when the user starts dragging the rectangle.
90 */
91 dragStart: EventEmitter<google.maps.MouseEvent>;
92 /**
93 * This event is fired when the DOM mousedown event is fired on the rectangle.
94 */
95 mouseDown: EventEmitter<google.maps.MouseEvent>;
96 /**
97 * This event is fired when the DOM mousemove event is fired on the rectangle.
98 */
99 mouseMove: EventEmitter<google.maps.MouseEvent>;
100 /**
101 * This event is fired on rectangle mouseout.
102 */
103 mouseOut: EventEmitter<google.maps.MouseEvent>;
104 /**
105 * This event is fired on rectangle mouseover.
106 */
107 mouseOver: EventEmitter<google.maps.MouseEvent>;
108 /**
109 * This event is fired when the DOM mouseup event is fired on the rectangle.
110 */
111 mouseUp: EventEmitter<google.maps.MouseEvent>;
112 /**
113 * This event is fired when the rectangle is right-clicked on.
114 */
115 rightClick: EventEmitter<google.maps.MouseEvent>;
116 private _rectangleAddedToManager;
117 private static _mapOptions;
118 private _eventSubscriptions;
119 constructor(_manager: RectangleManager);
120 /** @internal */
121 ngOnInit(): void;
122 /** @internal */
123 ngOnChanges(changes: {
124 [key: string]: SimpleChange;
125 }): void;
126 private _updateRectangleOptionsChanges;
127 private _registerEventListeners;
128 /** @internal */
129 ngOnDestroy(): void;
130 /**
131 * Gets the LatLngBounds of this Rectangle.
132 */
133 getBounds(): Promise<google.maps.LatLngBounds>;
134}