public string GetCenterRadiusCSVData(double _latitude, double _longitude, double _distance, bool _includeCenter = false) { HydrantWikiManager hwm = new HydrantWikiManager(); GeoPoint point = new GeoPoint(_longitude, _latitude); List <NearbyHydrant> hydrants = hwm.GetNearbyHydrants(point, _distance); if (_includeCenter) { NearbyHydrant center = new NearbyHydrant() { Color = "#F51D5A", Symbol = "cross", DistanceInFeet = "0.0", Position = new GeoPoint(_longitude, _latitude), HydrantGuid = Guid.Empty, Title = "Tag" }; hydrants.Add(center); } string csv = HydrantCSVHelper.GetHydrantCSV(hydrants); return(csv); }
public string GetGeoboxCSVData(DynamicDictionary _parameters) { HydrantWikiManager hwm = new HydrantWikiManager(); double east = Convert.ToDouble((string)_parameters["east"]); double west = Convert.ToDouble((string)_parameters["west"]); double north = Convert.ToDouble((string)_parameters["north"]); double south = Convert.ToDouble((string)_parameters["south"]); GeoBox geobox = new GeoBox(east, west, north, south); List <Hydrant> hydrants = hwm.GetHydrants(geobox); return(HydrantCSVHelper.GetHydrantCSV(hydrants)); }