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(); }
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(); }
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(); }
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(); }
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(); }