Exemplo n.º 1
0
 public static void SetDistanceAndAngleGeocacheFromLocation(List<GAPPSF.Core.Data.Geocache> gcList, GAPPSF.Core.Data.Location loc)
 {
     foreach (GAPPSF.Core.Data.Geocache gc in gcList)
     {
         SetDistanceAndAngleGeocacheFromLocation(gc, loc);
     }
 }
Exemplo n.º 2
0
        public MapFilesHandler(GAPPSF.MapProviders.MapControlFactory mapControlFactory)
        {
            _mapControlFactory = mapControlFactory;

            //Core.Settings.Default.MapsOSMBinOfflineMapFiles = @"c:\Users\peters-r1\Downloads\maps\netherlands.map";

            if (!string.IsNullOrEmpty(Core.Settings.Default.MapsOSMBinOfflineMapFiles))
            {
                string[] fl = Core.Settings.Default.MapsOSMBinOfflineMapFiles.Split(new char[] { '\r','\n' }, StringSplitOptions.RemoveEmptyEntries);
                foreach(string s in fl)
                {
                    _mapControlFactory.OSMBinFiles.Add(s);
                }
            }
            reload();

            _mapControlFactory.OSMBinFiles.CollectionChanged += OSMBinFiles_CollectionChanged;
        }
Exemplo n.º 3
0
 public static void SetDistanceAndAngleGeocacheFromLocation(GAPPSF.Core.Data.Geocache gc, GAPPSF.Core.Data.Location loc)
 {
     GeodeticMeasurement gm = CalculateDistance(loc.Lat, loc.Lon, gc.Lat, gc.Lon);
     gc.DistanceToCenter = (long)gm.EllipsoidalDistance;
     gc.AngleToCenter = (int)gm.Azimuth.Degrees;
 }
Exemplo n.º 4
0
 public static bool PointInPolygon(List<GAPPSF.Core.Data.Location> points, GAPPSF.Core.Data.Location ll)
 {
     return PointInPolygon(points, ll.Lat, ll.Lon);
 }
Exemplo n.º 5
0
 public static GeodeticMeasurement CalculateDistance(GAPPSF.Core.Data.Geocache gc, GAPPSF.Core.Data.Location loc)
 {
     return CalculateDistance(gc.Lat, gc.Lon, loc.Lat, loc.Lon);
 }
Exemplo n.º 6
0
 public static string GetCoordinatesPresentation(GAPPSF.Core.Data.Location loc)
 {
     return GetCoordinatesPresentation(loc.Lat, loc.Lon);
 }
Exemplo n.º 7
0
 public static GAPPSF.Core.Data.GeocacheType GetGeocacheType(GAPPSF.Core.Data.GeocacheTypeCollection gtCollection, string keyWord)
 {
     return GetGeocacheType(keyWord, 0);
 }