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

Getting Started with the Map Control

To use the Map control, begin by ensuring that the ID_Cap_Map capability is selected in the project’s WMAppManifest.xml file. Without the capability, an exception is raised at runtime.

Adding a Map control to a page requires a namespace definition at the top of the page, as shown:

xmlns:m="clr-namespace:Microsoft.Phone.Maps.Controls;                                      assembly=Microsoft.Phone.Maps"

An m:Map element can then be placed somewhere on your host page, like so:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">    <m:Map Loaded="HandleMapLoaded" /></Grid>

The Map control requires an API key to function in production. The Map ...

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