Esempio n. 1
0
        private void UserControl_Load(object sender, EventArgs e)
        {
            ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(Path.Combine(rootPath, "DallasCounty-4326.shp"));

            RoutingSourceForShortest = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-4326.rtg"));
            routingEngine            = new RoutingEngine(RoutingSourceForShortest, featureSource);

            RenderMap();
        }
Esempio n. 2
0
        private void UserControl_Load(object sender, EventArgs e)
        {
            featureSource = new ShapeFileFeatureSource(Path.Combine(rootPath, "DallasCounty-4326.shp"));
            routingSource = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-4326.shortest.rtg"));
            routingEngine = new RoutingEngine(routingSource, featureSource);

            featureSource.Open();
            routingSource.Open();

            isInEditMode = false;

            RenderMap();
        }
Esempio n. 3
0
        private void UserControl_Load(object sender, EventArgs e)
        {
            RenderMap();

            ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(shapeFilePathName);

            RoutingSourceForShortest = new RtgRoutingSource(shortestRtgFilePathName);
            RoutingSourceForFastest  = new RtgRoutingSource(fastestRtgFilePathName);
            routingEngine            = new RoutingEngine(RoutingSourceForShortest, featureSource);

            // Search the route between default source and target.
            FindPath();
        }
Esempio n. 4
0
        private void UserControl_Load(object sender, EventArgs e)
        {
            featureSource = new ShapeFileFeatureSource(Path.Combine(rootPath, "DallasCounty-4326.shp"));
            routingSource = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-4326.shortest.rtg"));
            routingEngine = new RoutingEngine(routingSource, featureSource);
            routingEngine.RoutingAlgorithm.FindingRoute += new EventHandler <FindingRouteRoutingAlgorithmEventArgs>(RoutingAlgorithm_FindingRoute);

            isAddingRoadblocks  = false;
            avoidableFeatureIds = new Collection <string>();

            RenderMap();
            Route();
        }
Esempio n. 5
0
        private void UserControl_Load(object sender, EventArgs e)
        {
            ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(Path.Combine(rootPath, "DallasCounty-3857.shp"));

            RoutingSourceForShortest    = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-3857.shortest.rtg"));
            RoutingSourceForFastest     = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-3857.fastest.rtg"));
            routingEngine               = new RoutingEngine(RoutingSourceForShortest, featureSource);
            routingEngine.GeographyUnit = GeographyUnit.Meter;

            RenderMap();

            FindPath();
        }