MapsTask.Center Property

Gets or sets the location that will be used as the center point for the map.

Namespace:  Microsoft.Phone.Tasks
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

public GeoCoordinate Center { get; set; }
    <GeoCoordinate .../>

Property Value

Type: System.Device.Location.GeoCoordinate
Type: GeoCoordinate. The center point of the map.

If you do not set the Center property before calling Show(), the user’s current location is used. You must set either the Center property or the SearchTerm property before calling Show or an InvalidOperationException will be thrown.

The GeoCoordinate type is found in the System.Device.Location namespace. To use it, you should add a reference to System.Device.dll to your application project and include the following using directive in your code.

using System.Device.Location;

Windows Phone OS

Supported in: 8.1, 8.0

© 2015 Microsoft