1 | import { AfterContentInit, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
|
2 | import { PolyMouseEvent } from '../services/google-maps-types';
|
3 | import { PolylineManager } from '../services/managers/polyline-manager';
|
4 | import { SebmGoogleMapPolylinePoint } from './google-map-polyline-point';
|
5 | /**
|
6 | * SebmGoogleMapPolyline renders a polyline on a {@link SebmGoogleMap}
|
7 | *
|
8 | * ### Example
|
9 | * ```typescript
|
10 | * import { Component } from 'angular2/core';
|
11 | * import { SebmGoogleMap, SebmGooglePolyline, SebmGooglePolylinePoint } from
|
12 | * 'angular2-google-maps/core';
|
13 | *
|
14 | * @Component({
|
15 | * selector: 'my-map-cmp',
|
16 | * directives: [SebmGoogleMap, SebmGooglePolyline, SebmGooglePolylinePoint],
|
17 | * styles: [`
|
18 | * .sebm-google-map-container {
|
19 | * height: 300px;
|
20 | * }
|
21 | * `],
|
22 | * template: `
|
23 | * <sebm-google-map [latitude]="lat" [longitude]="lng" [zoom]="zoom">
|
24 | * <sebm-google-map-polyline>
|
25 | * <sebm-google-map-polyline-point [latitude]="latA" [longitude]="lngA">
|
26 | * </sebm-google-map-polyline-point>
|
27 | * <sebm-google-map-polyline-point [latitude]="latB" [longitude]="lngB">
|
28 | * </sebm-google-map-polyline-point>
|
29 | * </sebm-google-map-polyline>
|
30 | * </sebm-google-map>
|
31 | * `
|
32 | * })
|
33 | * ```
|
34 | */
|
35 | export declare class SebmGoogleMapPolyline implements OnDestroy, OnChanges, AfterContentInit {
|
36 | private _polylineManager;
|
37 | /**
|
38 | * Indicates whether this Polyline handles mouse events. Defaults to true.
|
39 | */
|
40 | clickable: boolean;
|
41 | /**
|
42 | * If set to true, the user can drag this shape over the map. The geodesic property defines the
|
43 | * mode of dragging. Defaults to false.
|
44 | */
|
45 | draggable: boolean;
|
46 | /**
|
47 | * If set to true, the user can edit this shape by dragging the control points shown at the
|
48 | * vertices and on each segment. Defaults to false.
|
49 | */
|
50 | editable: boolean;
|
51 | /**
|
52 | * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of
|
53 | * the Earth. When false, edges of the polygon are rendered as straight lines in screen space.
|
54 | * Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions
|
55 | * are maintained relative to the surface of the earth. Defaults to false.
|
56 | */
|
57 | geodesic: boolean;
|
58 | /**
|
59 | * The stroke color. All CSS3 colors are supported except for extended named colors.
|
60 | */
|
61 | strokeColor: string;
|
62 | /**
|
63 | * The stroke opacity between 0.0 and 1.0.
|
64 | */
|
65 | strokeOpacity: number;
|
66 | /**
|
67 | * The stroke width in pixels.
|
68 | */
|
69 | strokeWeight: number;
|
70 | /**
|
71 | * Whether this polyline is visible on the map. Defaults to true.
|
72 | */
|
73 | visible: boolean;
|
74 | /**
|
75 | * The zIndex compared to other polys.
|
76 | */
|
77 | zIndex: number;
|
78 | /**
|
79 | * This event is fired when the DOM click event is fired on the Polyline.
|
80 | */
|
81 | lineClick: EventEmitter<PolyMouseEvent>;
|
82 | /**
|
83 | * This event is fired when the DOM dblclick event is fired on the Polyline.
|
84 | */
|
85 | lineDblClick: EventEmitter<PolyMouseEvent>;
|
86 | /**
|
87 | * This event is repeatedly fired while the user drags the polyline.
|
88 | */
|
89 | lineDrag: EventEmitter<MouseEvent>;
|
90 | /**
|
91 | * This event is fired when the user stops dragging the polyline.
|
92 | */
|
93 | lineDragEnd: EventEmitter<MouseEvent>;
|
94 | /**
|
95 | * This event is fired when the user starts dragging the polyline.
|
96 | */
|
97 | lineDragStart: EventEmitter<MouseEvent>;
|
98 | /**
|
99 | * This event is fired when the DOM mousedown event is fired on the Polyline.
|
100 | */
|
101 | lineMouseDown: EventEmitter<PolyMouseEvent>;
|
102 | /**
|
103 | * This event is fired when the DOM mousemove event is fired on the Polyline.
|
104 | */
|
105 | lineMouseMove: EventEmitter<PolyMouseEvent>;
|
106 | /**
|
107 | * This event is fired on Polyline mouseout.
|
108 | */
|
109 | lineMouseOut: EventEmitter<PolyMouseEvent>;
|
110 | /**
|
111 | * This event is fired on Polyline mouseover.
|
112 | */
|
113 | lineMouseOver: EventEmitter<PolyMouseEvent>;
|
114 | /**
|
115 | * This event is fired whe the DOM mouseup event is fired on the Polyline
|
116 | */
|
117 | lineMouseUp: EventEmitter<PolyMouseEvent>;
|
118 | /**
|
119 | * This even is fired when the Polyline is right-clicked on.
|
120 | */
|
121 | lineRightClick: EventEmitter<PolyMouseEvent>;
|
122 | /**
|
123 | * @internal
|
124 | */
|
125 | points: QueryList<SebmGoogleMapPolylinePoint>;
|
126 | private static _polylineOptionsAttributes;
|
127 | private _id;
|
128 | private _polylineAddedToManager;
|
129 | private _subscriptions;
|
130 | constructor(_polylineManager: PolylineManager);
|
131 | /** @internal */
|
132 | ngAfterContentInit(): void;
|
133 | ngOnChanges(changes: SimpleChanges): any;
|
134 | private _init();
|
135 | private _addEventListeners();
|
136 | /** @internal */
|
137 | _getPoints(): Array<SebmGoogleMapPolylinePoint>;
|
138 | /** @internal */
|
139 | id(): string;
|
140 | /** @internal */
|
141 | ngOnDestroy(): void;
|
142 | }
|