Giter Site home page Giter Site logo

devexpress-examples / how-to-get-routes-to-the-destination-point-using-the-bing-map-route-data-service-e4250 Goto Github PK

View Code? Open in Web Editor NEW
0.0 55.0 1.0 132 KB

This example demonstrates how to calculate routes to the destination point from major roads using the BingRouteDataProvider.CalculateRoutesFromMajorRoads method.

License: Other

C# 46.21% Visual Basic .NET 53.79%
dotnet dxmap wpf xpf

how-to-get-routes-to-the-destination-point-using-the-bing-map-route-data-service-e4250's Introduction

Map for WPF - How to Get Routes to the Destination Point with the Bing Map Route Data Service

This example demonstrates how to calculate routes to the destination point from major roads with the BingRouteDataProvider.CalculateRoutesFromMajorRoads method.

Before route calculation, specify destination point coordinates (GeoPoint.Latitude and GeoPoint.Longitude). In addition, you can specify the optional parameters: the destination name (RouteWaypoint.Description), driving or walking route travel mode using the BingRouteOptions.Mode property and route optimization options to calculate the optimal route either by time or by distance with the BingRouteOptions.RouteOptimization property.

To start the application, click the Calculate Routes From major Roads button , it handles the calculateRoutes_Click event. All parameters are passed to the CalculateMajorRoutes method, and you can see the results in the textblock element below and calculated routes on a map.

The requested results contain the total distance of a route, route leg, itinerary item ( BingRouteResult.Distance, BingRouteLeg.Distance, BingItineraryItem.Distance), the time required to follow the calculated route ( BingRouteResult.Time) and pass the rout leg and itinerary item (BingRouteLeg.Time, BingItineraryItem.Time). You can also see the maneuver instructions associated with the itinerary item (BingItineraryItem.ManeuverInstruction) and other parameters.

Note that if you run this sample as is, you will get a warning message informing that the specified Bing Maps key is invalid. To learn more how to register a Bing Maps account and create a key for it, please refer to the How to: Get a Bing Maps Key tutorial.


Files to Review

Documentation

how-to-get-routes-to-the-destination-point-using-the-bing-map-route-data-service-e4250's People

Contributors

alexilia avatar devexpressexamplebot avatar ritazakhodyaeva avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mariomc1

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.