HERE Launchers API reference

The HERE Launchers API for Windows phone providers Launchers that allow integration with HERE applications in the easy manner. To use the HERE Launchers in your own application, you need to add a reference to the HereLauncher.dll and also you need to add the following using statement to the top of your class file:

using Nokia.Phone.HereLaunchers;

The launcher APIs and examples illustrating the use of the launcher API are available at Nokia Developer project site.

Error handling

All the tasks expect that before calling their Show() method the app has a valid Application ID set. On debug build the API will continue to work without an application ID but will issue a warning in the debug output. In release builds however the call to Show() will throw an InvalidOperationException (MSDN) if the Application ID is missing.

ExploremapsShowMapTask

The ExploremapsShowMapTask allows you to start the Maps application with the map centered to a specified location. The location must be defined by using either the ViewPort or the Location argument.

With the Location argument, also the Zoom level can be optionally defined for limiting the area shown in the map. When using the ViewPort argument, the Zoom value (if specified) will be ignored.

Variable   Description
LocationRectangle ViewPort (either this or Location is required) Viewport of the map.
GeoCoordinate Location (either this or ViewPort is required) Center coordinate for the map view.
double Zoom: (Optional) Zoom level for the map view. Allowed values from 1.0 to 20.

Example code:

ExploremapsShowMapTask showmap = new ExploremapsShowMapTask(); 
showmap.ViewPort = new LocationRectangle(new GeoCoordinate(60.35, 24.60), new GeoCoordinate(60.25, 24.80)); 
showmap.Show();

ExploremapsShowPlaceTask

The ExploremapsShowPlaceTask allows you to start the Maps application with the map centered to a place shown in the map. The place Location must be defined, and optionally it can have a Title string as well. Optionally the visible map area can be limited with a supplied Zoom value.

Variable   Description
GeoCoordinate Location (required) Location coordinate for the place.
string Title (optional) Title to be used with the place.
double Zoom (optional) Zoom level for the map view. Allowed values from 1.0 to 20.0.

Example code:

ExploremapsShowPlaceTask showPlace = new ExploremapsShowPlaceTask();
showPlace.Location = new GeoCoordinate(60.35, 24.60);
showPlace.Zoom = 11;
showPlace.Title = "The Place";
showPlace.Show();

ExploremapsSearchPlacesTask

The ExploremapsSearchPlacesTask allows you to start the Maps application with the search view. The SearchTerm used in the search must be defined alongside with the Location for which the search will be performed.

Variable   Description
GeoCoordinate Location (required) Center coordinate for the map search.
string SearchTerm (required) Search query to be performed.

Example code:

ExploremapsSearchPlacesTask searchMap = new ExploremapsSearchPlacesTask();
searchMap.Location = new GeoCoordinate(60.35, 24.60);
searchMap.SearchTerm = "Hotel";
searchMap.Show();

ExploremapsExplorePlacesTask

The ExploremapsExplorePlacesTask allows you to start the Maps application where the nearby places of interest are shown.

There are no required parameters to be set before showing the map, but there are two optional ones. Location can be set to specify the map center for exploring; if it is left unspecified, then the current location is used for centering the map.

Second optional parameter is the category. The Category is a list of strings, and only the specified category strings as defined in the Nokia.Phone.MapAndDriveLaunchers.PlaceCategoryId class are allowed to be used.

Variable   Description
GeoCoordinate Location (optional) Center coordinate for the map
List<string> Category (optional) list of categories to limit which categories are shown in the map

Example code:

ExploremapsExplorePlacesTask searchMap = new ExploremapsExplorePlacesTask();
searchMap.Location = new GeoCoordinate(60.35, 24.60);
searchMap.Category.Add(Nokia.Phone.MapAndDriveLaunchers.PlaceCategoryId.eat_drink);
searchMap.Show();

DirectionsRouteDestinationTask

The DirectionsRouteDestinationTask allows you to start the Maps application and show a route in the map. There is only one required parameter to be defined, and it is the Destination coordinate, defining where the route is going to be created to.

Optionally also the origin coordinate could be defined; if it is left undefined, then the current location of the user will be used as the starting point of the route. Note that if the client application offers options for launching guided navigation when processing the route, the option is often disabled if the origin is defined. This is due to the fact that the guided navigation needs to use the current location as a starting point for the navigation.

The second optional parameter which can be defined is the Mode for routing. Allowed routing modes are defined in the Nokia.Phone.MapAndDriveLaunchers.RouteMode enumeration. If the route mode is left unset, then the RouteMode.Smart will be used.

Variable   Description
GeoCoordinate Destination (required) Destination location
GeoCoordinate Origin (optional) Departure location
RouteMode Mode (optional) Preferred route mode

Example code:

DirectionsRouteDestinationTask routeTo = new DirectionsRouteDestinationTask();
routeTo.Destination = new GeoCoordinate(60.35, 24.60);
routeTo.Mode = RouteMode.Car;
routeTo.Show();

GuidanceWalkTask

The GuidanceWalkTask allows you to start the Maps application with walking guidance turned on. Launching this task requires the Destination coordinates to be set; additionally the destination can be given a name, supplied with the Title string. The walking guidance navigation starts from the users current position, so no starting location can be set.

Variable   Description
GeoCoordinate Destination (required) Destination coordinate
string Title (optional) Destination title

Example code:

GuidanceWalkTask walkTo = new GuidanceWalkTask();
walkTo.Destination = new GeoCoordinate(60.35, 24.60);
walkTo.Title = "place to go";
walkTo.Show();

GuidanceDriveTask

The GuidanceDriveTask allows you to start the Drive navigation application. Launching this task requires the Destination coordinates to be set; additionally the destination can be given a name, supplied with the Title string. The Driving guidance navigation starts from the users current position, so no starting location can be set.

Variable   Description
GeoCoordinate Destination (required) Destination coordinate
string Title (optional) Destination title

Example code:

GuidanceDriveTask driveTo = new GuidanceDriveTask();
driveTo.Destination = new GeoCoordinate(60.35, 24.60);
driveTo.Title = "place to go";
driveTo.Show();

PlacesShowDetailsByLocationTask

The PlacesShowDetailsByLocationTask allows you to start the Maps application with the places view for the selected place. In general, places view shows a minimap for the selected location, and uses geocoding services for finding the address of the location. The Location of the place must be defined; optionally also a Title string to be shown with the place can be defined.

Variable   Description
GeoCoordinate Location (required) Place coordinate
string Title (optional) Custom place title

Example code:

PlacesShowDetailsByLocationTask showPlace = new PlacesShowDetailsByLocationTask();
showPlace.Location = toGeo;
showPlace.Title = StringBox.Text;
showPlace.Show();

PlacesShowDetailsByIdHrefTask

The PlacesShowDetailsByIdHrefTask allows you to start the Maps application with the places view for the selected place. Either the place Id or the place Href parameter must be defined. Both of these values can be fetched via Nokia Places APIs, and only values submitted by the Nokia Places APIs can be used with them. Optionally also a Title string to be shown with the place can be defined.

Variable   Description
string Id (either this or Href is required) Nokia Place Id
string Href (either this or Id is required) Nokia Place Href
string Title (optional) Custom place title

Example code:

PlacesShowDetailsByIdHrefTask placeTask = new PlacesShowDetailsByIdHrefTask();
placeTask.Id = "276u33dc-10ee9c030bc042e6a6e8e0ad56985be2";
placeTask.Show();

PublicTransitRouteDestinationTask

The PublicTransitRouteDestinationTask allows you to start the Public Transit application with the journeys view active. The only required parameter with the PublicTransitRouteDestinationTask is the Destination coordinate.

Optionally also the origin coordinate could be defined; if it is left undefined, then the current location of the user will be used as the starting point of the journey. Also optionally both destination and origin can have their title strings specified. Optionally the ArrivalTime to the destination and the DepartureTime from the origin can be defined when creating the journeys view. If both ArrivalTime and DepartureTime are set, then DepartureTime will be used. If neither ArrivalTime nor DepartureTime are set, then the current phone time will be used as departure time.

Variable   Description
GeoCoordinate Destination (required) Destination coordinate for the journey.
string DestinationTitle (optional) Destination title to be used with journey route.
GeoCoordinate Origin (optional) Origin coordinate for the journey.
string OriginTitle (optional) Origin title to be used with journey route.
DateTime ArrivalTime (optional) Desired arrival time to the destination.
DateTime DepartureTime (optional) Desired departure time from the origin.

Example code:

PublicTransitRouteDestinationTask JourneyTask = new PublicTransitRouteDestinationTask();
JourneyTask.Destination = new GeoCoordinate(60.35, 24.60);
JourneyTask.Show();

PublicTransitSearchStopsTask

The PublicTransitSearchStopsTask allows you to start the Public Transit application with the nearby stops view. This launcher task does not take any parameters, and will use the current location of the device as a location used for determining the nearby stops.

Example code:

PublicTransitSearchStopsTask taks = new PublicTransitSearchStopsTask();
taks.Show();


Last updated 17 December 2013

Back to top

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×