(
map: google.maps.Map,
layerConstructor: typeof google.maps.KmlLayer,
options: google.maps.KmlLayerOptions,
)
| 102 | } |
| 103 | |
| 104 | private _initialize( |
| 105 | map: google.maps.Map, |
| 106 | layerConstructor: typeof google.maps.KmlLayer, |
| 107 | options: google.maps.KmlLayerOptions, |
| 108 | ) { |
| 109 | // Create the object outside the zone so its events don't trigger change detection. |
| 110 | // We'll bring it back in inside the `MapEventManager` only for the events that the |
| 111 | // user has subscribed to. |
| 112 | this._ngZone.runOutsideAngular(() => { |
| 113 | this.kmlLayer = new layerConstructor(options); |
| 114 | this._assertInitialized(); |
| 115 | this.kmlLayer.setMap(map); |
| 116 | this._eventManager.setTarget(this.kmlLayer); |
| 117 | this.kmlLayerInitialized.emit(this.kmlLayer); |
| 118 | this._watchForOptionsChanges(); |
| 119 | this._watchForUrlChanges(); |
| 120 | }); |
| 121 | } |
| 122 | |
| 123 | ngOnDestroy() { |
| 124 | this._eventManager.destroy(); |
no test coverage detected