private void SetValues(GeoPoint geoPoint, UtmPoint utmPoint, object sender) { if (sender != edt_LatLong) { if (geoPoint == null) { edt_LatLong.Text = String.Empty; } else { edt_LatLong.Text = geoPoint.ToString(); } } if (sender != edt_geohash) { if (geoPoint == null) { edt_geohash.Text = String.Empty; } else { edt_geohash.Text = geoPoint.GeoHash; } } if (sender != edt_UTM) { if (utmPoint == null) { edt_UTM.Text = String.Empty; } else { edt_UTM.Text = utmPoint.ToString(); } } if (sender != edt_MGRS) { if (utmPoint == null) { edt_MGRS.Text = String.Empty; } else { edt_MGRS.Text = utmPoint.ToMgrsString(6); } } _Point = geoPoint; btnFlyTo.Enabled = (_Point != null); lbl_L7018Value.Text = "Not available"; if (geoPoint != null) { try { var sheet = RtsdMapIndex.IndexL7018(geoPoint); if (sheet != null) { lbl_L7018Value.Text = sheet.Name; } } catch (ArgumentOutOfRangeException) { } } }
public void TestIndexL7018() { GeoPoint khonKhaenLocation = new GeoPoint(16.4424, 102.8360); Assert.AreEqual("5541 I", RtsdMapIndex.IndexL7018(khonKhaenLocation).Name); }