MCPcopy Create free account
hub / github.com/angular/components / MapInfoWindow

Class MapInfoWindow

src/google-maps/map-info-window/map-info-window.ts:37–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 host: {'style': 'display: none'},
36})
37export class MapInfoWindow implements OnInit, OnDestroy {
38 private readonly _googleMap = inject(GoogleMap);
39 private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
40 private _ngZone = inject(NgZone);
41 private _eventManager = new MapEventManager(inject(NgZone));
42 private readonly _options = new BehaviorSubject<google.maps.InfoWindowOptions>({});
43 private readonly _position = new BehaviorSubject<
44 google.maps.LatLngLiteral | google.maps.LatLng | undefined
45 >(undefined);
46 private readonly _destroy = new Subject<void>();
47
48 /**
49 * Underlying google.maps.InfoWindow
50 *
51 * See developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow
52 */
53 infoWindow?: google.maps.InfoWindow;
54
55 @Input()
56 set options(options: google.maps.InfoWindowOptions) {
57 this._options.next(options || {});
58 }
59
60 @Input()
61 set position(position: google.maps.LatLngLiteral | google.maps.LatLng) {
62 this._position.next(position);
63 }
64
65 /**
66 * See
67 * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.closeclick
68 */
69 @Output() readonly closeclick: Observable<void> =
70 this._eventManager.getLazyEmitter<void>('closeclick');
71
72 /**
73 * See
74 * developers.google.com/maps/documentation/javascript/reference/info-window
75 * #InfoWindow.content_changed
76 */
77 @Output() readonly contentChanged: Observable<void> =
78 this._eventManager.getLazyEmitter<void>('content_changed');
79
80 /**
81 * See
82 * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.domready
83 */
84 @Output() readonly domready: Observable<void> =
85 this._eventManager.getLazyEmitter<void>('domready');
86
87 /**
88 * See
89 * developers.google.com/maps/documentation/javascript/reference/info-window
90 * #InfoWindow.position_changed
91 */
92 @Output() readonly positionChanged: Observable<void> =
93 this._eventManager.getLazyEmitter<void>('position_changed');
94

Callers

nothing calls this directly

Calls 1

getLazyEmitterMethod · 0.80

Tested by

no test coverage detected