public static string GetGMapLink(Location location, string text = "Google Map")
 {
     var sb = new StringBuilder();
     sb.Append($"<a href=\"{Constant.GoogleMapUrl}");
     sb.Append(location.Latitude);
     sb.Append(",");
     sb.Append(location.Longitude);
     sb.Append($"&z=17\">{text}</a>");
     return sb.ToString();
 }
        public static List<ulong> GetNearbyCellIds(Location location)
        {
            var nearbyCellIds = new List<S2CellId>();
            var cellId = S2CellId.FromLatLng(S2LatLng.FromDegrees(location.Latitude, location.Longitude)).ParentForLevel(15);

            nearbyCellIds.Add(cellId);
            for (var i = 0; i < Constant.ScanRange; i++)
            {
                nearbyCellIds.Add(GetPrevious(cellId, i));
                nearbyCellIds.Add(GetNext(cellId, i));
            }

            return nearbyCellIds.Select(c => c.Id).OrderBy(c => c).ToList();
        }
 private async Task RunAsyncAtLocation(Location location, CancellationToken cancelToken)
 {
     while (!cancelToken.IsCancellationRequested)
     {
         var scanProcessor = new ScannerProcessor();
         await scanProcessor.InitializeAsync(location);
         await scanProcessor.ExecuteContinuousScanAsync(cancelToken);
         await Task.Delay(Constant.RestartDelayInMs);
     }
 }