The Map Suite Routing “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Routing extension. The bundled solution comes with a small set of routable street data from Austin, TX and demonstrates simple routing, avoiding specific areas, getting turn-by-turn directions, optimizing for the Traveling Salesman Proble…
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8eeb18a Dec 11, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Routing upgrade to 10.4 Dec 11, 2018
.gitignore Upload code. Dec 28, 2016
README.md Update README.md Jul 10, 2017
Routing.sln upgrade to 10.4 Dec 11, 2018
ScreenShot.png Update screenshot. Mar 17, 2017

README.md

Routing Sample for WinForms

Description

Sample Data Download

The Map Suite Routing “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Routing extension. The bundled solution comes with a small set of routable street data from Austin, TX and demonstrates simple routing, avoiding specific areas, getting turn-by-turn directions, optimizing for the Traveling Salesman Problem, and much more. Full source code is included in both C# and VB.NET languages; simply select your preferred language to download the associated solution.

Please refer to Wiki for the details.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

Feature feature = featureSource.GetFeatureById(roadId, ReturningColumnsType.NoColumns);

LineBaseShape sourceShape = (LineBaseShape)feature.GetShape();
Collection<LineShape> lines = ConvertLineBaseShapeToLines(sourceShape);

List<string> adjacentIDs = new List<string>();
foreach (LineShape line in lines)
{
    Collection<Feature> features = featureSource.GetFeaturesInsideBoundingBox(line.GetBoundingBox(), ReturningColumnsType.NoColumns);
    foreach (Feature tempFeature in features)
    {
        BaseShape tempShape = tempFeature.GetShape();
        if (feature.Id != tempFeature.Id && line.Intersects(tempShape))
        {
            adjacentIDs.Add(tempFeature.Id);
        }
    }
}

Getting Help

Map Suite Desktop for Winforms Wiki Resources

Map Suite Desktop for Winforms Product Description

ThinkGeo Community Site

ThinkGeo Web Site

Key APIs

This example makes use of the following APIs:

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.