Oxygene and WP8 – MapsDirectionsTask Launcher

Oxygene and Windows Phone 8 tutorials – Article Index

The MapsDirectionsTask launcher launches the Maps Application in Windows Phone device and displays the driving direction between the specified end points to the MapsDirectionsTask object.

How to use the MapsDirectionsTask Launcher in Windows Phone 8 with Oxygene?

To use the MapsDirectionsTask launcher with Oxygene, follow the below steps.

1. Include the following namespace in the code behind file.

uses
Microsoft.Phone.Tasks;

2. Create an instance of the MapsDirectionsTask, specify the start and the end points used for identifying the driving direction. You can also provide only one end point in which case, the current location of the user is taken for the other end point.

// developerpublish.com - MapsDirectionsTask Launcher Sample
var direction: MapsDirectionsTask := new MapsDirectionsTask();
var location1: LabeledMapLocation := new LabeledMapLocation('Domlur , Bangalore', nil);
var location2: LabeledMapLocation := new LabeledMapLocation('HSR Layout BDA Complex , Bangalore', nil);
direction.Start := location2;
direction.End := location1;
direction.Show()

Oxygene and WP8 - MapsDirectionsTask Launcher

Download the sample source code on MapsDirectionsTask Launcher in Oxygene and WP8 here

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...