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

Method constructor

src/google-maps/google-map/google-map.ts:252–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250 this._eventManager.getLazyEmitter<void>('zoom_changed');
251
252 constructor() {
253 const platformId = inject<Object>(PLATFORM_ID);
254 this._isBrowser = isPlatformBrowser(platformId);
255
256 if (this._isBrowser) {
257 const googleMapsWindow: GoogleMapsWindow = window;
258 if (!googleMapsWindow.google && (typeof ngDevMode === 'undefined' || ngDevMode)) {
259 throw Error(
260 'Namespace google not found, cannot construct embedded google ' +
261 'map. Please install the Google Maps JavaScript API: ' +
262 'https://developers.google.com/maps/documentation/javascript/' +
263 'tutorial#Loading_the_Maps_API',
264 );
265 }
266
267 this._existingAuthFailureCallback = googleMapsWindow.gm_authFailure;
268 googleMapsWindow.gm_authFailure = () => {
269 if (this._existingAuthFailureCallback) {
270 this._existingAuthFailureCallback();
271 }
272 this.authFailure.emit();
273 };
274 }
275 }
276
277 ngOnChanges(changes: SimpleChanges<this>) {
278 if (changes['height'] || changes['width']) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected