private void UserControl_Load(object sender, EventArgs e) { featureSource = new ShapeFileFeatureSource(Path.Combine(rootPath, "DallasCounty-4326.shp")); allowArea = new PolygonShape(txtAvoidWkt.Text); featureSource.Open(); Collection <Feature> features = featureSource.SpatialQuery(allowArea, QueryType.Within, ReturningColumnsType.NoColumns); featureSource.Close(); allowFeatureIds = new Collection <string>(); foreach (Feature item in features) { allowFeatureIds.Add(item.Id); } RoutingSource routingSource = new RtgRoutingSource(Path.Combine(rootPath, "DallasCounty-4326.shortest.rtg")); routingEngine = new RoutingEngine(routingSource, new AStarRoutingAlgorithm(), featureSource); RenderMap(); }