Showing Directions with the Built-In Maps App

In addition to displaying a single point using the built-in Maps app, you can also display a route. The MapsDirectionsTask class allows you to specify a start and end point for the route, as shown in the following example:

MapsDirectionsTask mapsDirectionsTask = new MapsDirectionsTask();GeoCoordinate startCoordinate = new GeoCoordinate(47.635, -122.362);mapsDirectionsTask.Start           = new LabeledMapLocation("Start Point", startCoordinate);GeoCoordinate endCoordinate = new GeoCoordinate(47.650, -122.349);mapsDirectionsTask.End = new LabeledMapLocation("End Point", endCoordinate);mapsDirectionsTask.Show();

Note

If you do not specify a Start value for the MapsDirectionsTask ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.