diff --git a/src/google-maps/google-map/google-map.ts b/src/google-maps/google-map/google-map.ts index 9f6efcdd4bd7..ed059dd7d003 100644 --- a/src/google-maps/google-map/google-map.ts +++ b/src/google-maps/google-map/google-map.ts @@ -19,7 +19,6 @@ import { OnInit, Output, ViewEncapsulation, - Optional, Inject, PLATFORM_ID, NgZone, @@ -231,15 +230,9 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy { constructor( private readonly _elementRef: ElementRef, private _ngZone: NgZone, - /** - * @deprecated `platformId` parameter to become required. - * @breaking-change 10.0.0 - */ - @Optional() @Inject(PLATFORM_ID) platformId?: Object) { - - // @breaking-change 10.0.0 Remove null check for `platformId`. - this._isBrowser = - platformId ? isPlatformBrowser(platformId) : typeof window === 'object' && !!window; + @Inject(PLATFORM_ID) platformId: Object) { + + this._isBrowser = isPlatformBrowser(platformId); if (this._isBrowser) { const googleMapsWindow: GoogleMapsWindow = window; diff --git a/src/google-maps/map-polyline/map-polyline.ts b/src/google-maps/map-polyline/map-polyline.ts index 082bb2ca4a05..846312e2c0ad 100644 --- a/src/google-maps/map-polyline/map-polyline.ts +++ b/src/google-maps/map-polyline/map-polyline.ts @@ -188,7 +188,6 @@ export class MapPolyline implements OnInit, OnDestroy { */ getPath(): google.maps.MVCArray { this._assertInitialized(); - // @breaking-change 11.0.0 Make the return value nullable. return this.polyline.getPath(); } diff --git a/tools/public_api_guard/google-maps/google-maps.d.ts b/tools/public_api_guard/google-maps/google-maps.d.ts index 5df3db16e9d8..595b08738c7c 100644 --- a/tools/public_api_guard/google-maps/google-maps.d.ts +++ b/tools/public_api_guard/google-maps/google-maps.d.ts @@ -29,8 +29,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy { width: string | number | null; set zoom(zoom: number); zoomChanged: Observable; - constructor(_elementRef: ElementRef, _ngZone: NgZone, - platformId?: Object); + constructor(_elementRef: ElementRef, _ngZone: NgZone, platformId: Object); fitBounds(bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): void; getBounds(): google.maps.LatLngBounds | null; getCenter(): google.maps.LatLng; @@ -48,7 +47,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy { panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void; panToBounds(latLngBounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): void; static ɵcmp: i0.ɵɵComponentDefWithMeta; - static ɵfac: i0.ɵɵFactoryDef; + static ɵfac: i0.ɵɵFactoryDef; } export declare class GoogleMapsModule {