Panning and Zooming the Map Control
The Map
control’s Center
property is a GeoCoordinate
that is used to retrieve and set the center location of the map view. The following example shows how to set the Center
property of a Map
control in XAML by providing the latitude and longitude (in that order):
<m:Map Center="45.8, 6.15" />
The Center
property can also be data bound, as shown in the following example:
<m:Map Center="{Binding Center, Mode=TwoWay}" />
By using a TwoWay
data binding, you can track the current center point of the map from your viewmodel.
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.