private async Task RefreshPolygonsAsync() { if (_visibleRegion == null) { return; } int layer = _hexagonal.CalculateLayerFromCameraPositionZoom(_currentCameraIdledEventArgs.Position.Zoom); if (layer != _layerLast) { Polygons.Clear(); _layerLast = layer; } _hexagonal.Initialize(_currentCameraIdledEventArgs.Position.Target.Latitude, _currentCameraIdledEventArgs.Position.Target.Longitude, layer); for (int row = -2; row < 3; ++row) { for (int col = -2; col < 3; ++col) { var poly = _hexagonal.HexagonalPolygon(_hexagonal.CenterLocation, col, row); if (Polygons.Any(p => p.PolygonTagEquals(poly))) { continue; } int heatCount = _layerService.NumberOfUsersInsidePolygonTag(poly.ExtractPolygonTag().Tag); poly.FillColor = _heatGradientService.SteppedColor(heatCount); poly.IsClickable = true; poly.Clicked += Polygon_Clicked; if (poly.PolygonTagStringEquals(_currentPositionTag)) { poly.StrokeColor = Color.Coral; poly.StrokeWidth = 5; } else { poly.StrokeColor = _heatGradientService.SteppedColor(heatCount + 1); poly.StrokeWidth = 1; } Polygons.Add(poly); } } await RefreshZonesAsync(); }