O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying a Location on a Map Using the BingMapsTask

The Bing Maps task allows you to launch the built-in Maps application centered at the location specified by the BingMapsTask.Center property, which is of type GeoCoordinate. If not specified the map is centered at the user’s current location. If provided, the Center property is ignored and the BingMapsTask.SearchTerm property is used to search for matching locations. The best match is then tagged on the map.

To use the BingMapsTask to search for a location, define it as a field in your class and set its SearchTerm property, as demonstrated:

BingMapsTask bingMapsTask = new BingMapsTask();...bingMapsTask.SearchTerm = "prague";bingMapsTask.Show();

The following example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required