From 0804b68faa54094a487328087a6081a90095c4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Rio?= Date: Mon, 1 Apr 2024 15:50:14 +0100 Subject: [PATCH] Fixed lint issues. --- src/Global.d.ts | 1 + src/Providers/Maps/Google/Features/GoogleMarkerClusterer.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Global.d.ts b/src/Global.d.ts index 38f41db0..2555d0a3 100644 --- a/src/Global.d.ts +++ b/src/Global.d.ts @@ -20,6 +20,7 @@ declare global { //The types below, are useful for TypeScript intellisense. type GoogleMapsAlgorithm = OriginalAlgorithm; type GoogleMapsCluster = OriginalCluster; + type GoogleMapsMarker = google.maps.Marker | google.maps.marker.AdvancedMarkerElement; type GoogleMapsMarkerClusterer = OriginalMarkerClusterer; type GoogleMapsMarkerClustererOptions = OriginalMarkerClustererOptions; type GoogleMapsClusterRenderer = OriginalRenderer; diff --git a/src/Providers/Maps/Google/Features/GoogleMarkerClusterer.ts b/src/Providers/Maps/Google/Features/GoogleMarkerClusterer.ts index b3cd30c8..5f52f416 100644 --- a/src/Providers/Maps/Google/Features/GoogleMarkerClusterer.ts +++ b/src/Providers/Maps/Google/Features/GoogleMarkerClusterer.ts @@ -89,7 +89,7 @@ namespace Provider.Maps.Google.Feature { public addMarker(marker: OSFramework.Maps.Marker.IMarker): void { if (this.isEnabled && marker.isReady) { // We need to make sure that a redraw is triggered whenever a new marker is added to the clusters - this._markerClusterer.addMarker(marker.provider, false); + this._markerClusterer.addMarker(marker.provider as GoogleMapsMarker, false); } } @@ -146,7 +146,7 @@ namespace Provider.Maps.Google.Feature { public removeMarker(marker: OSFramework.Maps.Marker.IMarker): void { if (this.isEnabled && marker.isReady) { // We need to make sure that a redraw is triggered whenever a new marker is removed from the clusters - this._markerClusterer?.removeMarker(marker.provider, false); + this._markerClusterer?.removeMarker(marker.provider as GoogleMapsMarker, false); } } @@ -155,7 +155,7 @@ namespace Provider.Maps.Google.Feature { } public setClusterRenderer(renderer: OSFramework.Maps.Feature.IMarkerClustererRender) { - this._renderer = renderer; + this._renderer = renderer as GoogleMapsClusterRenderer; if (this.isEnabled) { this._rebuildClusters(); }