From 5cbe4e1358174075d29a395fea8c5e5d3f377cae Mon Sep 17 00:00:00 2001 From: LaptopRazor Date: Sat, 27 Aug 2022 10:01:23 +0300 Subject: [PATCH] [Bug] MarkerClustering Redraw() do not work #204 --- GoogleMapsComponents/Maps/MarkerClustering.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/GoogleMapsComponents/Maps/MarkerClustering.cs b/GoogleMapsComponents/Maps/MarkerClustering.cs index b93651ad..3feb7ab8 100644 --- a/GoogleMapsComponents/Maps/MarkerClustering.cs +++ b/GoogleMapsComponents/Maps/MarkerClustering.cs @@ -130,17 +130,27 @@ public virtual async Task FitMapToMarkers(int padding) /// Recalculates and redraws all the marker clusters from scratch. Call this after changing any properties. /// [Obsolete("Deprecated in favor of Redraw() to match latest js-markerclusterer")] - public virtual async Task Repaint() + public virtual Task Repaint() { - await Redraw(); + return Render(); } /// /// Recalculates and redraws all the marker clusters from scratch. Call this after changing any properties. /// - public virtual async Task Redraw() + [Obsolete("Deprecated in favor of Render() to match latest js-markerclusterer")] + public virtual Task Redraw() { - await _jsObjectRef.InvokeAsync("redraw"); + return Render(); + } + + /// + /// https://googlemaps.github.io/js-markerclusterer/interfaces/Renderer.html#render + /// + /// + public virtual Task Render() + { + return _jsObjectRef.InvokeAsync("render"); }