,

Showing a Location with the Built-In Maps App

Often it is not necessary to go to the trouble of building a dedicated map view into your app. The built-in Maps app can be launched directly from your own app using the MapsTask launcher. Observe the following example:

MapsTask mapsTask = new MapsTask
    {
        Center = new GeoCoordinate(47.6204, -122.3493),
        ZoomLevel = 8,
        SearchTerm = "Caffe"
    };
mapsTask.Show();

The MapsTask class allows you to position the map view using its Center and ZoomLevel properties. You can also specify a search term that causes the map to display all matching search results on the map.

The sample’s MapViewModel class demonstrates the MapsTask using a command named ViewInMapsAppCommand that is executed when the user taps an application bar menu item.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.51.129