(
map: google.maps.Map,
polylineConstructor: typeof google.maps.Polyline,
options: google.maps.PolygonOptions,
)
| 158 | } |
| 159 | |
| 160 | private _initialize( |
| 161 | map: google.maps.Map, |
| 162 | polylineConstructor: typeof google.maps.Polyline, |
| 163 | options: google.maps.PolygonOptions, |
| 164 | ) { |
| 165 | // Create the object outside the zone so its events don't trigger change detection. |
| 166 | // We'll bring it back in inside the `MapEventManager` only for the events that the |
| 167 | // user has subscribed to. |
| 168 | this._ngZone.runOutsideAngular(() => { |
| 169 | this.polyline = new polylineConstructor(options); |
| 170 | this._assertInitialized(); |
| 171 | this.polyline.setMap(map); |
| 172 | this._eventManager.setTarget(this.polyline); |
| 173 | this.polylineInitialized.emit(this.polyline); |
| 174 | this._watchForOptionsChanges(); |
| 175 | this._watchForPathChanges(); |
| 176 | }); |
| 177 | } |
| 178 | |
| 179 | ngOnDestroy() { |
| 180 | this._eventManager.destroy(); |
no test coverage detected