Coder Social home page Coder Social logo

github2017luo / routingsample-forwinforms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from war-man/routingsample-forwinforms

0.0 1.0 0.0 428 KB

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.

C# 97.50% HTML 1.57% CSS 0.93%

routingsample-forwinforms's Introduction

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.

routingsample-forwinforms's People

Contributors

githubadmin-thinkgeo avatar rex-thinkgeo avatar mike-thinkgeo avatar vincent-thinkgeo avatar bill-thinkgeo avatar casper-thinkgeo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.