Exemple #1
0
        internal List <BikeTouringGISLayer> CreateRoutes(string fileName, List <Route> routes)
        {
            var result = new List <BikeTouringGISLayer>();

            foreach (Route route in routes)
            {
                var layer = new BikeTouringGISLayer(fileName, route);
                layer.SetExtentToFitWithWaypoints(_wayPointsExtent);
                result.Add(layer);
            }
            return(result);
        }
Exemple #2
0
        internal List <BikeTouringGISLayer> CreateTracks(string fileName, List <Track> tracks)
        {
            var result = new List <BikeTouringGISLayer>();

            foreach (Track track in tracks)
            {
                var layer = new BikeTouringGISLayer(fileName, track);
                layer.SetExtentToFitWithWaypoints(_wayPointsExtent);
                result.Add(layer);
            }
            return(result);
        }
Exemple #3
0
        private BikeTouringGISLayer CreateLayer(string fileName)
        {
            var path    = Path.Combine(UnitTestDirectory, fileName);
            var gpxInfo = new GpxFileReader().LoadFile(path);

            gpxInfo.Tracks.ForEach(x => x.IsConvertedToRoute = true);
            var factory = new GeometryFactory(gpxInfo);

            factory.CreateGeometries();
            var layer = new BikeTouringGISLayer("testroute", gpxInfo.Routes.First());

            layer.SetExtentToFitWithWaypoints(gpxInfo.WayPointsExtent);
            return(layer);
        }