public void GeoRegionInfo_ListByLocation()
		{
			var r = GeoRegionInfo.ListByLocation(new GeoPosition(38.90723, -77.036464));
			Assert.AreEqual(3, r.Count());
			Assert.IsTrue(r.Any(x => x.RegionAbbr == "DC"));
			Assert.IsTrue(r.Any(x => x.RegionAbbr == "MD"));
			Assert.IsTrue(r.Any(x => x.RegionAbbr == "VA"));
		}
Пример #2
0
 // --------------------------------------------------
 // Region
 public List <GeoRegionInfo> NearbyRegions(IGeoLatLon point)
 {
     return(GeoRegionInfo.ListByLocation(point).OrderBy(x => GeoDistance.BetweenPoints(x.Center, point).Meters).ToList());
 }