From 32a3a756ab83446da3d5dbb5665dc1f1fc435cbc Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 6 May 2026 09:26:39 +0200 Subject: [PATCH] fix(google-maps): deprecate heatmap layer The APIs that the heatmap layer is based on have been deprecated for about a year and Google Maps will remove them later this month. These changes turn the `map-heatmap-layer` into a no-op and log an error message so that users know what is happening. --- goldens/google-maps/index.api.md | 21 +-- src/dev-app/google-map/google-map-demo.html | 12 -- src/dev-app/google-map/google-map-demo.ts | 22 --- src/google-maps/map-heatmap-layer/README.md | 48 ----- .../map-heatmap-layer.spec.ts | 167 ------------------ .../map-heatmap-layer/map-heatmap-layer.ts | 167 +++--------------- .../testing/fake-google-map-utils.ts | 46 +---- .../kitchen-sink/kitchen-sink.html | 8 - .../kitchen-sink/kitchen-sink.ts | 2 - 9 files changed, 33 insertions(+), 460 deletions(-) delete mode 100644 src/google-maps/map-heatmap-layer/README.md delete mode 100644 src/google-maps/map-heatmap-layer/map-heatmap-layer.spec.ts diff --git a/goldens/google-maps/index.api.md b/goldens/google-maps/index.api.md index dbc87214d31e..a3fbc083cb41 100644 --- a/goldens/google-maps/index.api.md +++ b/goldens/google-maps/index.api.md @@ -305,8 +305,8 @@ export class GoogleMapsModule { static ɵmod: i0.ɵɵNgModuleDeclaration; } -// @public -export type HeatmapData = google.maps.MVCArray | (google.maps.LatLng | google.maps.visualization.WeightedLocation | google.maps.LatLngLiteral)[]; +// @public @deprecated +export type HeatmapData = any; // @public export class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint, MarkerDirective { @@ -532,19 +532,14 @@ export class MapGroundOverlay implements OnInit, OnDestroy { static ɵfac: i0.ɵɵFactoryDeclaration; } -// @public -export class MapHeatmapLayer implements OnInit, OnChanges, OnDestroy { +// @public @deprecated +export class MapHeatmapLayer { + constructor(); set data(data: HeatmapData); getData(): HeatmapData; - heatmap?: google.maps.visualization.HeatmapLayer; - readonly heatmapInitialized: EventEmitter; - // (undocumented) - ngOnChanges(changes: SimpleChanges): void; - // (undocumented) - ngOnDestroy(): void; - // (undocumented) - ngOnInit(): void; - set options(options: Partial); + heatmap?: any; + readonly heatmapInitialized: EventEmitter; + set options(options: any); // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) diff --git a/src/dev-app/google-map/google-map-demo.html b/src/dev-app/google-map/google-map-demo.html index 9d4b75dd5a20..b65b0d96ea41 100644 --- a/src/dev-app/google-map/google-map-demo.html +++ b/src/dev-app/google-map/google-map-demo.html @@ -72,11 +72,6 @@ @if (directionsResult) { } - @if (isHeatmapDisplayed) { - - }

{{display?.lat}}

@@ -206,13 +201,6 @@ -
- -
-