MapControl MapControl MapControl MapControl Class

Definition

Represents a symbolic or photorealistic map of the Earth.

public : sealed class MapControl : Control, IMapControl, IMapControl2, IMapControl3, IMapControl4, IMapControl5public sealed class MapControl : Control, IMapControl, IMapControl2, IMapControl3, IMapControl4, IMapControl5Public NotInheritable Class MapControl Inherits Control Implements IMapControl, IMapControl2, IMapControl3, IMapControl4, IMapControl5// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl/>
- or -
<Maps:MapControl></Maps:MapControl>

Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

Constructors

MapControl() MapControl() MapControl() MapControl()

Initializes a new instance of the MapControl class.

public : MapControl()public MapControl()Public Sub New()// This API is not available in Javascript.
See Also

Properties

ActualCamera ActualCamera ActualCamera ActualCamera

Gets the MapCamera settings that define the current position of the camera.

public : MapCamera ActualCamera { get; }public MapCamera ActualCamera { get; }Public ReadOnly Property ActualCamera As MapCamera// This API is not available in Javascript.
Value
MapCamera MapCamera MapCamera MapCamera

The MapCamera settings that define the current position of the camera.

Remarks

During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.

The map's camera settings are updated whenever the view of the map is changed. For example, when updating the Center property or calling the TrySetSceneAsync method.

BusinessLandmarksEnabled BusinessLandmarksEnabled BusinessLandmarksEnabled BusinessLandmarksEnabled

This property is not implemented.

public : PlatForm::Boolean BusinessLandmarksEnabled { get; set; }public bool BusinessLandmarksEnabled { get; set; }Public ReadWrite Property BusinessLandmarksEnabled As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

This property is not implemented.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

BusinessLandmarksEnabledProperty BusinessLandmarksEnabledProperty BusinessLandmarksEnabledProperty BusinessLandmarksEnabledProperty

This property is not implemented.

public : static DependencyProperty BusinessLandmarksEnabledProperty { get; }public static DependencyProperty BusinessLandmarksEnabledProperty { get; }Public Static ReadOnly Property BusinessLandmarksEnabledProperty As DependencyProperty// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

BusinessLandmarksVisible BusinessLandmarksVisible BusinessLandmarksVisible BusinessLandmarksVisible

Gets or sets a value that indicates whether businesses are displayed on the map.

public : PlatForm::Boolean BusinessLandmarksVisible { get; set; }public bool BusinessLandmarksVisible { get; set; }Public ReadWrite Property BusinessLandmarksVisible As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if businesses are displayed on the map; otherwise, false.

BusinessLandmarksVisibleProperty BusinessLandmarksVisibleProperty BusinessLandmarksVisibleProperty BusinessLandmarksVisibleProperty

Identifies the BusinessLandmarksVisible dependency property.

public : static DependencyProperty BusinessLandmarksVisibleProperty { get; }public static DependencyProperty BusinessLandmarksVisibleProperty { get; }Public Static ReadOnly Property BusinessLandmarksVisibleProperty As DependencyProperty// This API is not available in Javascript.

Center Center Center Center

Gets or sets the center of the map.

public : Geopoint Center { get; set; }public Geopoint Center { get; set; }Public ReadWrite Property Center As Geopoint// This API is not available in Javascript.
Value
Geopoint Geopoint Geopoint Geopoint

The center of the map.

Remarks

Since a string can't be converted to a Geopoint, you can't specify a value for the Center property in XAML markup unless you use data binding.

See Also

CenterProperty CenterProperty CenterProperty CenterProperty

Identifies the Center dependency property.

public : static DependencyProperty CenterProperty { get; }public static DependencyProperty CenterProperty { get; }Public Static ReadOnly Property CenterProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Center dependency property.

See Also

Children Children Children Children

Gets the collection of objects that are children of the MapControl.

public : IVector<DependencyObject> Children { get; }public IList<DependencyObject> Children { get; }Public ReadOnly Property Children As IList<DependencyObject>// This API is not available in Javascript.
Value
IVector<DependencyObject> IList<DependencyObject> IList<DependencyObject> IList<DependencyObject>

The collection of objects that are children of the MapControl.

Remarks

Display XAML user interface elements such as a Button, a HyperlinkButton, or a TextBlock by adding them as Children of the MapControl. You can also add them to the MapItemsControl, or bind the MapItemsControl to an item or a collection of items.

Alternately, to display pushpins, images, and shapes on the MapControl, add them to its MapElements collection.

For more info, see Display maps with 2D, 3D, and Streetside views.

See Also

ChildrenProperty ChildrenProperty ChildrenProperty ChildrenProperty

Identifies the Children dependency property.

public : static DependencyProperty ChildrenProperty { get; }public static DependencyProperty ChildrenProperty { get; }Public Static ReadOnly Property ChildrenProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Children dependency property.

See Also

ColorScheme ColorScheme ColorScheme ColorScheme

Gets or sets the color scheme of the map – for example, light or dark.

public : MapColorScheme ColorScheme { get; set; }public MapColorScheme ColorScheme { get; set; }Public ReadWrite Property ColorScheme As MapColorScheme// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl ColorScheme="colorScheme" />
- or -
<Maps:MapControl>
    <Maps:MapControl.ColorScheme>colorScheme</Maps:MapControl.ColorScheme>
</Maps:MapControl>

Value
MapColorScheme MapColorScheme MapColorScheme MapColorScheme

The color scheme of the map – for example, light or dark.

See Also

ColorSchemeProperty ColorSchemeProperty ColorSchemeProperty ColorSchemeProperty

Identifies the ColorScheme dependency property.

public : static DependencyProperty ColorSchemeProperty { get; }public static DependencyProperty ColorSchemeProperty { get; }Public Static ReadOnly Property ColorSchemeProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ColorScheme dependency property.

See Also

CustomExperience CustomExperience CustomExperience CustomExperience

Gets or sets a custom experience for the MapControl.

public : MapCustomExperience CustomExperience { get; set; }public MapCustomExperience CustomExperience { get; set; }Public ReadWrite Property CustomExperience As MapCustomExperience// This API is not available in Javascript.

Remarks

A custom experience changes the way a map appears in the MapControl. For example, the StreetsideExperience changes the perspective of the map to appear as though you were viewing a location from the street level.

DesiredPitch DesiredPitch DesiredPitch DesiredPitch

Gets or sets a value that indicates by how many degrees you want the map to be tilted. Sometimes the desired pitch cannot be set.

public : double DesiredPitch { get; set; }public double DesiredPitch { get; set; }Public ReadWrite Property DesiredPitch As double// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl DesiredPitch="desiredPitch" />
- or -
<Maps:MapControl>
    <Maps:MapControl.DesiredPitch>desiredPitch</Maps:MapControl.DesiredPitch>
</Maps:MapControl>

Value
double double double double

A value that indicates by how many degrees you want the map to be tilted. Sometimes the desired pitch cannot be set.

Remarks

For more information about pitch, see the remarks section of the MapCamera(Geopoint, Double, Double, Double, Double) overload.

The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
DesiredPitch0-750-900-180

See Also

DesiredPitchProperty DesiredPitchProperty DesiredPitchProperty DesiredPitchProperty

Identifies the DesiredPitch dependency property.

public : static DependencyProperty DesiredPitchProperty { get; }public static DependencyProperty DesiredPitchProperty { get; }Public Static ReadOnly Property DesiredPitchProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the DesiredPitch dependency property.

See Also

Heading Heading Heading Heading

Gets or sets the directional heading of the map in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West.

public : double Heading { get; set; }public double Heading { get; set; }Public ReadWrite Property Heading As double// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl Heading="heading"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.Heading>heading</Maps:MapControl.Heading>
</Maps:MapControl>

Value
double double double double

The directional heading of the map in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West.

Remarks

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

See Also

HeadingProperty HeadingProperty HeadingProperty HeadingProperty

Identifies the Heading dependency property.

public : static DependencyProperty HeadingProperty { get; }public static DependencyProperty HeadingProperty { get; }Public Static ReadOnly Property HeadingProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Heading dependency property.

See Also

Is3DSupported Is3DSupported Is3DSupported Is3DSupported

Gets a value that indicates if 3D is supported within the map.

public : PlatForm::Boolean Is3DSupported { get; }public bool Is3DSupported { get; }Public ReadOnly Property Is3DSupported As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if 3D is supported within the map; otherwise, false.

Is3DSupportedProperty Is3DSupportedProperty Is3DSupportedProperty Is3DSupportedProperty

Identifies the Is3DSupported dependency property.

public : static DependencyProperty Is3DSupportedProperty { get; }public static DependencyProperty Is3DSupportedProperty { get; }Public Static ReadOnly Property Is3DSupportedProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

Is the identifier for the Is3DSupported dependency property.

IsStreetsideSupported IsStreetsideSupported IsStreetsideSupported IsStreetsideSupported

Gets a value that indicates if Streetside is supported within the map.

public : PlatForm::Boolean IsStreetsideSupported { get; }public bool IsStreetsideSupported { get; }Public ReadOnly Property IsStreetsideSupported As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if Streetside is supported within the map; otherwise, false.

IsStreetsideSupportedProperty IsStreetsideSupportedProperty IsStreetsideSupportedProperty IsStreetsideSupportedProperty

Identifies the IsStreetsideSupported dependency property.

public : static DependencyProperty IsStreetsideSupportedProperty { get; }public static DependencyProperty IsStreetsideSupportedProperty { get; }Public Static ReadOnly Property IsStreetsideSupportedProperty As DependencyProperty// This API is not available in Javascript.

LandmarksVisible LandmarksVisible LandmarksVisible LandmarksVisible

Gets or sets a value that indicates whether 3D buildings are displayed on the map.

public : PlatForm::Boolean LandmarksVisible { get; set; }public bool LandmarksVisible { get; set; }Public ReadWrite Property LandmarksVisible As bool// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl LandmarksVisible="landmarksVisible"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.LandmarksVisible>landmarksVisible</Maps:MapControl.LandmarksVisible>
</Maps:MapControl>

Value
PlatForm::Boolean bool bool bool

true if 3D buildings are displayed on the map; otherwise, false.

See Also

LandmarksVisibleProperty LandmarksVisibleProperty LandmarksVisibleProperty LandmarksVisibleProperty

Identifies the LandmarksVisible dependency property.

public : static DependencyProperty LandmarksVisibleProperty { get; }public static DependencyProperty LandmarksVisibleProperty { get; }Public Static ReadOnly Property LandmarksVisibleProperty As DependencyProperty// This API is not available in Javascript.
See Also

Layers Layers Layers Layers

Gets the collection of MapLayer objects that are children of the MapControl.

public : IVector<MapLayer> Layers { get; set; }public IList<MapLayer> Layers { get; set; }Public ReadWrite Property Layers As IList<MapLayer>// This API is not available in Javascript.
Value
IVector<MapLayer> IList<MapLayer> IList<MapLayer> IList<MapLayer>

The collection of MapLayer objects that are children of the MapControl.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

LayersProperty LayersProperty LayersProperty LayersProperty

Identifies the Layers dependency property.

public : static DependencyProperty LayersProperty { get; }public static DependencyProperty LayersProperty { get; }Public Static ReadOnly Property LayersProperty As DependencyProperty// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

LoadingStatus LoadingStatus LoadingStatus LoadingStatus

Gets the loading status of the map to be displayed in the MapControl.

public : MapLoadingStatus LoadingStatus { get; }public MapLoadingStatus LoadingStatus { get; }Public ReadOnly Property LoadingStatus As MapLoadingStatus// This API is not available in Javascript.
Value
MapLoadingStatus MapLoadingStatus MapLoadingStatus MapLoadingStatus

The loading status of the map to be displayed in the MapControl.

See Also

LoadingStatusProperty LoadingStatusProperty LoadingStatusProperty LoadingStatusProperty

Identifies the LoadingStatus dependency property.

public : static DependencyProperty LoadingStatusProperty { get; }public static DependencyProperty LoadingStatusProperty { get; }Public Static ReadOnly Property LoadingStatusProperty As DependencyProperty// This API is not available in Javascript.
See Also

LocationProperty LocationProperty LocationProperty LocationProperty

Identifies the MapControl.Location XAML attached property.

public : static DependencyProperty LocationProperty { get; }public static DependencyProperty LocationProperty { get; }Public Static ReadOnly Property LocationProperty As DependencyProperty// This API is not available in Javascript.
See Also

MapElements MapElements MapElements MapElements

Gets the collection of MapElement objects that are children of the MapControl.

public : IVector<MapElement> MapElements { get; }public IList<MapElement> MapElements { get; }Public ReadOnly Property MapElements As IList<MapElement>// This API is not available in Javascript.
Value
IVector<MapElement> IList<MapElement> IList<MapElement> IList<MapElement>

The collection of MapElement objects that are children of the MapControl.

Remarks

Note

In the Windows 10 Fall Creators Update, we recommend that you add MapElement objects to a MapElementsLayer instead of adding them to the MapElements collection.

Display pushpins, images, and shapes on the MapControl by adding them to its MapElements collection.

  • Display an image such as a pushpin with optional text by using the MapIcon class. Keep the default image or provide a custom image.
  • Define and display a MapPolygon or a MapPolyline. Alternately, to display XAML elements on the MapControl, add them to its Children collection.

For more info, see Display maps with 2D, 3D, and Streetside views.

See Also

MapElementsProperty MapElementsProperty MapElementsProperty MapElementsProperty

Identifies the MapElements dependency property.

public : static DependencyProperty MapElementsProperty { get; }public static DependencyProperty MapElementsProperty { get; }Public Static ReadOnly Property MapElementsProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the MapElements dependency property.

See Also

MapProjection MapProjection MapProjection MapProjection

Gets or sets a MapProjection that specifies how to transform the latitudes and longitudes of the map.

public : MapProjection MapProjection { get; set; }public MapProjection MapProjection { get; set; }Public ReadWrite Property MapProjection As MapProjection// This API is not available in Javascript.
Value
MapProjection MapProjection MapProjection MapProjection

An MapProjection that specifies how to transform the latitudes and longitudes of the map.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

MapProjectionProperty MapProjectionProperty MapProjectionProperty MapProjectionProperty

Identifies the MapProjection dependency property.

public : static DependencyProperty MapProjectionProperty { get; }public static DependencyProperty MapProjectionProperty { get; }Public Static ReadOnly Property MapProjectionProperty As DependencyProperty// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

MapServiceToken MapServiceToken MapServiceToken MapServiceToken

Gets or sets the authentication key required for using the MapControl and online mapping services.

public : PlatForm::String MapServiceToken { get; set; }public string MapServiceToken { get; set; }Public ReadWrite Property MapServiceToken As string// This API is not available in Javascript.
Value
PlatForm::String string string string

The authentication key required for using the MapControl and online mapping services.

See Also

MapServiceTokenProperty MapServiceTokenProperty MapServiceTokenProperty MapServiceTokenProperty

Identifies the MapServiceToken dependency property.

public : static DependencyProperty MapServiceTokenProperty { get; }public static DependencyProperty MapServiceTokenProperty { get; }Public Static ReadOnly Property MapServiceTokenProperty As DependencyProperty// This API is not available in Javascript.
See Also

MaxZoomLevel MaxZoomLevel MaxZoomLevel MaxZoomLevel

Gets the maximum zoom level for the map.

public : double MaxZoomLevel { get; }public double MaxZoomLevel { get; }Public ReadOnly Property MaxZoomLevel As double// This API is not available in Javascript.
Value
double double double double

The maximum zoom level for the map.

Remarks

The maximum and minimum values of ZoomLevel depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
ZoomLevel1-201-2024-26

See Also

MinZoomLevel MinZoomLevel MinZoomLevel MinZoomLevel

Gets the minimum zoom level for the map.

public : double MinZoomLevel { get; }public double MinZoomLevel { get; }Public ReadOnly Property MinZoomLevel As double// This API is not available in Javascript.
Value
double double double double

The minimum zoom level for the map.

Remarks

See the remarks section of the MaxZoomLevel property.

See Also

NormalizedAnchorPointProperty NormalizedAnchorPointProperty NormalizedAnchorPointProperty NormalizedAnchorPointProperty

Identifies the MapControl.NormalizedAnchorPoint XAML attached property.

public : static DependencyProperty NormalizedAnchorPointProperty { get; }public static DependencyProperty NormalizedAnchorPointProperty { get; }Public Static ReadOnly Property NormalizedAnchorPointProperty As DependencyProperty// This API is not available in Javascript.
See Also

PanInteractionMode PanInteractionMode PanInteractionMode PanInteractionMode

Gets or sets a value that indicates if the pan gesture is recognized on the map.

public : MapPanInteractionMode PanInteractionMode { get; set; }public MapPanInteractionMode PanInteractionMode { get; set; }Public ReadWrite Property PanInteractionMode As MapPanInteractionMode// This API is not available in Javascript.
Value
MapPanInteractionMode MapPanInteractionMode MapPanInteractionMode MapPanInteractionMode

A value that indicates if the pan gesture is recognized on the map.

PanInteractionModeProperty PanInteractionModeProperty PanInteractionModeProperty PanInteractionModeProperty

Identifies the PanInteractionMode dependency property.

public : static DependencyProperty PanInteractionModeProperty { get; }public static DependencyProperty PanInteractionModeProperty { get; }Public Static ReadOnly Property PanInteractionModeProperty As DependencyProperty// This API is not available in Javascript.

PedestrianFeaturesVisible PedestrianFeaturesVisible PedestrianFeaturesVisible PedestrianFeaturesVisible

Gets or sets a value that indicates whether pedestrian features such as public stairs are displayed on the map.

public : PlatForm::Boolean PedestrianFeaturesVisible { get; set; }public bool PedestrianFeaturesVisible { get; set; }Public ReadWrite Property PedestrianFeaturesVisible As bool// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl PedestrianFeaturesVisible="pedestrianFeaturesVisible"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.PedestrianFeaturesVisible>pedestrianFeaturesVisible</Maps:MapControl.PedestrianFeaturesVisible>
</Maps:MapControl>

Value
PlatForm::Boolean bool bool bool

true if pedestrian features such as public stairs are displayed on the map; otherwise, false.

See Also

PedestrianFeaturesVisibleProperty PedestrianFeaturesVisibleProperty PedestrianFeaturesVisibleProperty PedestrianFeaturesVisibleProperty

Identifies the PedestrianFeaturesVisible dependency property.

public : static DependencyProperty PedestrianFeaturesVisibleProperty { get; }public static DependencyProperty PedestrianFeaturesVisibleProperty { get; }Public Static ReadOnly Property PedestrianFeaturesVisibleProperty As DependencyProperty// This API is not available in Javascript.
See Also

Pitch Pitch Pitch Pitch

Gets the actual pitch of the map. Sometimes the pitch requested by setting the DesiredPitch property cannot be set.

public : double Pitch { get; }public double Pitch { get; }Public ReadOnly Property Pitch As double// This API is not available in Javascript.
Value
double double double double

The actual pitch of the map. Sometimes the pitch requested by setting the property cannot be set.

See Also

PitchProperty PitchProperty PitchProperty PitchProperty

Identifies the Pitch dependency property.

public : static DependencyProperty PitchProperty { get; }public static DependencyProperty PitchProperty { get; }Public Static ReadOnly Property PitchProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Pitch dependency property.

See Also

RotateInteractionMode RotateInteractionMode RotateInteractionMode RotateInteractionMode

Gets or sets a value that indicates if the map responds to the rotate gesture and if the corresponding UI control appears on the map.

public : MapInteractionMode RotateInteractionMode { get; set; }public MapInteractionMode RotateInteractionMode { get; set; }Public ReadWrite Property RotateInteractionMode As MapInteractionMode// This API is not available in Javascript.
Value
MapInteractionMode MapInteractionMode MapInteractionMode MapInteractionMode

A value that specifies if the map responds to the rotate gesture and if the corresponding UI control appears on the map.

RotateInteractionModeProperty RotateInteractionModeProperty RotateInteractionModeProperty RotateInteractionModeProperty

Identifies the RotateInteractionMode dependency property.

public : static DependencyProperty RotateInteractionModeProperty { get; }public static DependencyProperty RotateInteractionModeProperty { get; }Public Static ReadOnly Property RotateInteractionModeProperty As DependencyProperty// This API is not available in Javascript.

Routes Routes Routes Routes

Gets the collection of MapRouteView objects displayed on the map.

public : IVector<MapRouteView> Routes { get; }public IList<MapRouteView> Routes { get; }Public ReadOnly Property Routes As IList<MapRouteView>// This API is not available in Javascript.
Value
IVector<MapRouteView> IList<MapRouteView> IList<MapRouteView> IList<MapRouteView>

The collection of MapRouteView objects displayed on the map.

Remarks

To display a route on a map, construct a MapRouteView with the MapRoute and add the MapRouteView to the Routes collection of the MapControl.

See Also

RoutesProperty RoutesProperty RoutesProperty RoutesProperty

Identifies the Routes dependency property.

public : static DependencyProperty RoutesProperty { get; }public static DependencyProperty RoutesProperty { get; }Public Static ReadOnly Property RoutesProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Routes dependency property.

See Also

Scene Scene Scene Scene

Gets or sets the MapScene associated with this MapControl.

public : MapScene Scene { get; set; }public MapScene Scene { get; set; }Public ReadWrite Property Scene As MapScene// This API is not available in Javascript.
Value
MapScene MapScene MapScene MapScene

The MapScene associated with this MapControl.

Remarks

Setting the scene is a synchronous operation, there is no animation involved.

SceneProperty SceneProperty SceneProperty SceneProperty

Identifies the Scene dependency property.

public : static DependencyProperty SceneProperty { get; }public static DependencyProperty SceneProperty { get; }Public Static ReadOnly Property SceneProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Scene dependency property.

See Also

Style Style Style Style

Specifies the style of the map - for example, a road map or an aerial map.

public : MapStyle Style { get; set; }public MapStyle Style { get; set; }Public ReadWrite Property Style As MapStyle// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl Style="style" />
- or -
<Maps:MapControl>
    <Maps:MapControl.Style>style</Maps:MapControl.Style>
</Maps:MapControl>

Value
MapStyle MapStyle MapStyle MapStyle

The style of the map - for example, a road map or an aerial map.

Remarks

Important

Aerial styles are not available when the network is disconnected from the internet.

See Also

StyleProperty StyleProperty StyleProperty StyleProperty

Identifies the Style dependency property.

public : static DependencyProperty StyleProperty { get; }public static DependencyProperty StyleProperty { get; }Public Static ReadOnly Property StyleProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Style dependency property.

See Also

StyleSheet StyleSheet StyleSheet StyleSheet

Gets or sets an object that defines the style of the map control.

public : MapStyleSheet StyleSheet { get; set; }public MapStyleSheet StyleSheet { get; set; }Public ReadWrite Property StyleSheet As MapStyleSheet// This API is not available in Javascript.
Value
MapStyleSheet MapStyleSheet MapStyleSheet MapStyleSheet

An object that defines the style of the map control.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Examples

The following example sets the StyleSheet property by using the static MapControl.RoadDark method.


  myMap.StyleSheet = MapStyleSheet.RoadDark();

StyleSheetProperty StyleSheetProperty StyleSheetProperty StyleSheetProperty

Identifies the StyleSheet dependency property.

public : static DependencyProperty StyleSheetProperty { get; }public static DependencyProperty StyleSheetProperty { get; }Public Static ReadOnly Property StyleSheetProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the StyleSheet dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

TargetCamera TargetCamera TargetCamera TargetCamera

Gets the MapCamera settings that define the final position of the camera.

public : MapCamera TargetCamera { get; }public MapCamera TargetCamera { get; }Public ReadOnly Property TargetCamera As MapCamera// This API is not available in Javascript.
Value
MapCamera MapCamera MapCamera MapCamera

The MapCamera settings that define the final position of the camera.

Remarks

During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.

TileSources TileSources TileSources TileSources

Gets or sets the collection of MapTileSource objects that are children of the MapControl.

public : IVector<MapTileSource> TileSources { get; }public IList<MapTileSource> TileSources { get; }Public ReadOnly Property TileSources As IList<MapTileSource>// This API is not available in Javascript.
Value
IVector<MapTileSource> IList<MapTileSource> IList<MapTileSource> IList<MapTileSource>

The collection of MapTileSource objects that are children of the MapControl.

See Also

TileSourcesProperty TileSourcesProperty TileSourcesProperty TileSourcesProperty

Identifies the TileSources dependency property.

public : static DependencyProperty TileSourcesProperty { get; }public static DependencyProperty TileSourcesProperty { get; }Public Static ReadOnly Property TileSourcesProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the TileSources dependency property.

See Also

TiltInteractionMode TiltInteractionMode TiltInteractionMode TiltInteractionMode

Gets or sets a value that indicates if the map responds to the tilt gesture and if the corresponding UI control appears on the map.

public : MapInteractionMode TiltInteractionMode { get; set; }public MapInteractionMode TiltInteractionMode { get; set; }Public ReadWrite Property TiltInteractionMode As MapInteractionMode// This API is not available in Javascript.
Value
MapInteractionMode MapInteractionMode MapInteractionMode MapInteractionMode

A value that specifies if the map responds to the tilt gesture and if the corresponding UI control appears on the map.

TiltInteractionModeProperty TiltInteractionModeProperty TiltInteractionModeProperty TiltInteractionModeProperty

Identifies the TiltInteractionMode dependency property.

public : static DependencyProperty TiltInteractionModeProperty { get; }public static DependencyProperty TiltInteractionModeProperty { get; }Public Static ReadOnly Property TiltInteractionModeProperty As DependencyProperty// This API is not available in Javascript.

TrafficFlowVisible TrafficFlowVisible TrafficFlowVisible TrafficFlowVisible

Gets or sets a value that indicates whether traffic conditions are displayed on the map.

public : PlatForm::Boolean TrafficFlowVisible { get; set; }public bool TrafficFlowVisible { get; set; }Public ReadWrite Property TrafficFlowVisible As bool// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl TrafficFlowVisible="trafficFlowVisible"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.TrafficFlowVisible>trafficFlowVisible</Maps:MapControl.TrafficFlowVisible>
</Maps:MapControl>

Value
PlatForm::Boolean bool bool bool

true if traffic conditions are displayed on the map; otherwise, false.

See Also

TrafficFlowVisibleProperty TrafficFlowVisibleProperty TrafficFlowVisibleProperty TrafficFlowVisibleProperty

Identifies the TrafficFlowVisible dependency property.

public : static DependencyProperty TrafficFlowVisibleProperty { get; }public static DependencyProperty TrafficFlowVisibleProperty { get; }Public Static ReadOnly Property TrafficFlowVisibleProperty As DependencyProperty// This API is not available in Javascript.
See Also

TransformOrigin TransformOrigin TransformOrigin TransformOrigin

Gets or sets a point to which the logical center of the map is transformed.

public : Point TransformOrigin { get; set; }public Point TransformOrigin { get; set; }Public ReadWrite Property TransformOrigin As Point// This API is not available in Javascript.
Value
Point Point Point Point

A point to which the logical center of the map is transformed. Use a value between 0 and 1 (but not 0 or 1) for the X and Y properties of the Point.

Remarks

The TransformOrigin represents a point around which the map rotates – for example, when the user manipulates the map, or when you change the value of the Heading property. Consider setting the Y value of the TransformOrigin to a value greater than 0.5 when the map is tilted - that is, when the Pitch is greater than 0. This moves the logical center closer to the user - that is, closer to the bottom of the screen - and shows the user more of what’s in the distance when the map is rotated.

After you set the value of the TransformOrigin property for the MapControl, the Center property continues to return the previous center until you set the Center to the same value as the TransformOrigin.

See Also

TransformOriginProperty TransformOriginProperty TransformOriginProperty TransformOriginProperty

Identifies the TransformOrigin dependency property.

public : static DependencyProperty TransformOriginProperty { get; }public static DependencyProperty TransformOriginProperty { get; }Public Static ReadOnly Property TransformOriginProperty As DependencyProperty// This API is not available in Javascript.
See Also

TransitFeaturesEnabled TransitFeaturesEnabled TransitFeaturesEnabled TransitFeaturesEnabled

This property is not implemented.

public : PlatForm::Boolean TransitFeaturesEnabled { get; set; }public bool TransitFeaturesEnabled { get; set; }Public ReadWrite Property TransitFeaturesEnabled As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

This property is not implemented.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

TransitFeaturesEnabledProperty TransitFeaturesEnabledProperty TransitFeaturesEnabledProperty TransitFeaturesEnabledProperty

This property is not implemented.

public : static DependencyProperty TransitFeaturesEnabledProperty { get; }public static DependencyProperty TransitFeaturesEnabledProperty { get; }Public Static ReadOnly Property TransitFeaturesEnabledProperty As DependencyProperty// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

TransitFeaturesVisible TransitFeaturesVisible TransitFeaturesVisible TransitFeaturesVisible

Gets or sets a value that indicates if transit features are displayed on the map.

public : PlatForm::Boolean TransitFeaturesVisible { get; set; }public bool TransitFeaturesVisible { get; set; }Public ReadWrite Property TransitFeaturesVisible As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if transit features are displayed on the map; otherwise, false.

TransitFeaturesVisibleProperty TransitFeaturesVisibleProperty TransitFeaturesVisibleProperty TransitFeaturesVisibleProperty

Identifies the TransitFeaturesVisible dependency property.

public : static DependencyProperty TransitFeaturesVisibleProperty { get; }public static DependencyProperty TransitFeaturesVisibleProperty { get; }Public Static ReadOnly Property TransitFeaturesVisibleProperty As DependencyProperty// This API is not available in Javascript.

ViewPadding ViewPadding ViewPadding ViewPadding

Gets or sets the padding inside a map control.

public : Thickness ViewPadding { get; set; }public Thickness ViewPadding { get; set; }Public ReadWrite Property ViewPadding As Thickness// This API is not available in Javascript.
Value
Thickness Thickness Thickness Thickness

The amount of space between the content of a MapControl and its Margin or Border. The default is a Thickness with values of 0 on all four sides.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

For more information about how this property behaves, see the Control.Padding property.

ViewPaddingProperty ViewPaddingProperty ViewPaddingProperty ViewPaddingProperty

Identifies the ViewPadding dependency property.

public : static DependencyProperty ViewPaddingProperty { get; }public static DependencyProperty ViewPaddingProperty { get; }Public Static ReadOnly Property ViewPaddingProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ViewPadding dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

WatermarkMode WatermarkMode WatermarkMode WatermarkMode

Gets or sets a value that determines when the watermark of the map is displayed.

public : MapWatermarkMode WatermarkMode { get; set; }public MapWatermarkMode WatermarkMode { get; set; }Public ReadWrite Property WatermarkMode As MapWatermarkMode// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl WatermarkMode="watermarkMode"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.WatermarkMode>watermarkMode</Maps:MapControl.WatermarkMode>
</Maps:MapControl>

Value
MapWatermarkMode MapWatermarkMode MapWatermarkMode MapWatermarkMode

A value that determines when the watermark of the map is displayed.

See Also

WatermarkModeProperty WatermarkModeProperty WatermarkModeProperty WatermarkModeProperty

Identifies the WatermarkMode dependency property.

public : static DependencyProperty WatermarkModeProperty { get; }public static DependencyProperty WatermarkModeProperty { get; }Public Static ReadOnly Property WatermarkModeProperty As DependencyProperty// This API is not available in Javascript.
See Also

ZoomInteractionMode ZoomInteractionMode ZoomInteractionMode ZoomInteractionMode

Gets or sets a value that indicates if the map responds to the zoom gesture and if the corresponding UI control appears on the map.

public : MapInteractionMode ZoomInteractionMode { get; set; }public MapInteractionMode ZoomInteractionMode { get; set; }Public ReadWrite Property ZoomInteractionMode As MapInteractionMode// This API is not available in Javascript.
Value
MapInteractionMode MapInteractionMode MapInteractionMode MapInteractionMode

A value that specifies if the map responds to the zoom gesture and if the corresponding UI control appears on the map.

ZoomInteractionModeProperty ZoomInteractionModeProperty ZoomInteractionModeProperty ZoomInteractionModeProperty

Identifies the ZoomInteractionMode dependency property.

public : static DependencyProperty ZoomInteractionModeProperty { get; }public static DependencyProperty ZoomInteractionModeProperty { get; }Public Static ReadOnly Property ZoomInteractionModeProperty As DependencyProperty// This API is not available in Javascript.

ZoomLevel ZoomLevel ZoomLevel ZoomLevel

Gets or sets the zoom level of the map, which is a value between 1 and 20 in 2D views.

public : double ZoomLevel { get; set; }public double ZoomLevel { get; set; }Public ReadWrite Property ZoomLevel As double// This API is not available in Javascript.
<!-- xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" -->

<Maps:MapControl ZoomLevel="zoomLevel"/>
- or -
<Maps:MapControl>
    <Maps:MapControl.ZoomLevel>zoomLevel</Maps:MapControl.ZoomLevel>
</Maps:MapControl>

Value
double double double double

The zoom level of the map, which is a value between 1 and 20 in 2D views.

Remarks

See the remarks section of the TryZoomInAsync method.

See Also

ZoomLevelProperty ZoomLevelProperty ZoomLevelProperty ZoomLevelProperty

Identifies the ZoomLevel dependency property.

public : static DependencyProperty ZoomLevelProperty { get; }public static DependencyProperty ZoomLevelProperty { get; }Public Static ReadOnly Property ZoomLevelProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ZoomLevel dependency property.

See Also

Methods

FindMapElementsAtOffset(Point) FindMapElementsAtOffset(Point) FindMapElementsAtOffset(Point) FindMapElementsAtOffset(Point)

Retrieves the collection of MapElement objects at the specified point on the map.

public : IVectorView<MapElement> FindMapElementsAtOffset(Point offset)public IReadOnlyList<MapElement> FindMapElementsAtOffset(Point offset)Public Function FindMapElementsAtOffset(offset As Point) As IReadOnlyList( Of MapElement )// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

The point on the map from which to retrieve the collection of MapElement objects.

Returns
IVectorView<MapElement> IReadOnlyList<MapElement> IReadOnlyList<MapElement> IReadOnlyList<MapElement>

The collection of MapElement objects at the specified point on the map.

See Also

FindMapElementsAtOffset(Point, Double) FindMapElementsAtOffset(Point, Double) FindMapElementsAtOffset(Point, Double) FindMapElementsAtOffset(Point, Double)

Retrieves the collection of MapElement objects within the specified radius.

public : IVectorView<MapElement> FindMapElementsAtOffset(Point offset, double radius)public IReadOnlyList<MapElement> FindMapElementsAtOffset(Point offset, Double radius)Public Function FindMapElementsAtOffset(offset As Point, radius As Double) As IReadOnlyList( Of MapElement )// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

The point on the map that marks the center of a radius from which to retrieve the collection of MapElement objects.

radius
double Double Double Double

A number that's added to the offset to mark the edge of the radius.

Returns
IVectorView<MapElement> IReadOnlyList<MapElement> IReadOnlyList<MapElement> IReadOnlyList<MapElement>

The collection of MapElement objects within the specified radius.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

Use this overload to retrieve a collection of map objects by using a hit test area that your app captures from touch interactions.

See Also

GetLocation(DependencyObject) GetLocation(DependencyObject) GetLocation(DependencyObject) GetLocation(DependencyObject)

Gets the value of the MapControl.Location XAML attached property from the specified child element of a MapControl. The location is the geographic location on the MapControl at which the MapControl.NormalizedAnchorPoint of the child element is positioned.

public : static Geopoint GetLocation(DependencyObject element)public static Geopoint GetLocation(DependencyObject element)Public Static Function GetLocation(element As DependencyObject) As Geopoint// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which to read the property value.

Returns

The value of the MapControl.Location XAML attached property on the specified child element of a MapControl.

See Also

GetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) GetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) GetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) GetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

Converts a point on the map to a geographic location by using the specified altitude reference system.

Note

This method is deprecated. Use the TryGetLocationFromOffset method instead.

public : void GetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, Geopoint location)public void GetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, Geopoint location)Public Function GetLocationFromOffset(offset As Point, desiredReferenceSystem As AltitudeReferenceSystem, location As Geopoint) As void// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

A point on the map to convert to a geographic location.

desiredReferenceSystem
AltitudeReferenceSystem AltitudeReferenceSystem AltitudeReferenceSystem AltitudeReferenceSystem

The altitude reference system of the geographic point. A value of Unspecified for the altitude reference system has the same effect as using the default GetLocationFromOffset(Windows.Foundation.Point offset, Windows.Devices.Geolocation.Geopoint location) overload.

location
Geopoint Geopoint Geopoint Geopoint

When this method returns, contains the corresponding geographic location.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

This method provides an instance of a Geopoint. That Geopoint contains a BasicGeoPosition. object. The desiredReferenceSystem parameter sets the Altitude field of that object.

This method will throw an exception if the point is invalid.

Note

An AltitudeReferenceSystem of Ellipsoid might not be supported.

GetLocationFromOffset(Point, Geopoint) GetLocationFromOffset(Point, Geopoint) GetLocationFromOffset(Point, Geopoint) GetLocationFromOffset(Point, Geopoint)

Converts a point on the map to a geographic location.

Note

This method is deprecated. Use the TryGetLocationFromOffset method instead.

public : void GetLocationFromOffset(Point offset, Geopoint location)public void GetLocationFromOffset(Point offset, Geopoint location)Public Function GetLocationFromOffset(offset As Point, location As Geopoint) As void// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

A point on the map to convert to a geographic location.

location
Geopoint Geopoint Geopoint Geopoint

When this method returns, contains the corresponding geographic location.

Remarks

This method will throw an exception if the point is invalid.

See Also

GetNormalizedAnchorPoint(DependencyObject) GetNormalizedAnchorPoint(DependencyObject) GetNormalizedAnchorPoint(DependencyObject) GetNormalizedAnchorPoint(DependencyObject)

Gets the value of the MapControl.NormalizedAnchorPoint XAML attached property from the specified child element of a MapControl. The anchor point is the point on the child element that is positioned at the point on the MapControl specified by the MapControl.Location attached property.

public : static Point GetNormalizedAnchorPoint(DependencyObject element)public static Point GetNormalizedAnchorPoint(DependencyObject element)Public Static Function GetNormalizedAnchorPoint(element As DependencyObject) As Point// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element from which to read the property value.

Returns

The value of the MapControl.NormalizedAnchorPoint XAML attached property on the specified child element of a MapControl.

See Also

GetOffsetFromLocation(Geopoint, Point) GetOffsetFromLocation(Geopoint, Point) GetOffsetFromLocation(Geopoint, Point) GetOffsetFromLocation(Geopoint, Point)

Converts a geographic location to a point on the map.

public : void GetOffsetFromLocation(Geopoint location, Point offset)public void GetOffsetFromLocation(Geopoint location, Point offset)Public Function GetOffsetFromLocation(location As Geopoint, offset As Point) As void// This API is not available in Javascript.
Parameters
location
Geopoint Geopoint Geopoint Geopoint

A geographic location to convert to a point on the map.

offset
Point Point Point Point

When this method returns, contains the corresponding point on the map.

Remarks

Compare the GetLocationFromOffset method.

See Also

GetVisibleRegion(MapVisibleRegionKind) GetVisibleRegion(MapVisibleRegionKind) GetVisibleRegion(MapVisibleRegionKind) GetVisibleRegion(MapVisibleRegionKind)

Gets the visible region of the map control.

public : Geopath GetVisibleRegion(MapVisibleRegionKind region)public Geopath GetVisibleRegion(MapVisibleRegionKind region)Public Function GetVisibleRegion(region As MapVisibleRegionKind) As Geopath// This API is not available in Javascript.
Parameters
Returns

The geopath indicating the visible region of the map control. The returned value can be null when a valid visible region cannot be calculated.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

IsLocationInView(Geopoint, Boolean) IsLocationInView(Geopoint, Boolean) IsLocationInView(Geopoint, Boolean) IsLocationInView(Geopoint, Boolean)

Determines whether the specified geographic location is located in the portion of the map currently visible in the MapControl.

public : void IsLocationInView(Geopoint location, bool isInView)public void IsLocationInView(Geopoint location, Boolean isInView)Public Function IsLocationInView(location As Geopoint, isInView As Boolean) As void// This API is not available in Javascript.
Parameters
location
Geopoint Geopoint Geopoint Geopoint

A geographic location.

isInView
bool Boolean Boolean Boolean

When this method returns, contains true if the specified geographic location is located in the portion of the map currently visible in the MapControl; otherwise, contains false.

See Also

SetLocation(DependencyObject, Geopoint) SetLocation(DependencyObject, Geopoint) SetLocation(DependencyObject, Geopoint) SetLocation(DependencyObject, Geopoint)

Sets the value of the MapControl.Location XAML attached property on the specified child element of a MapControl. The location is the geographic location on the MapControl at which the MapControl.NormalizedAnchorPoint of the child element is positioned.

public : static void SetLocation(DependencyObject element, Geopoint value)public static void SetLocation(DependencyObject element, Geopoint value)Public Static Function SetLocation(element As DependencyObject, value As Geopoint) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

value
Geopoint Geopoint Geopoint Geopoint

The value of the MapControl.Location XAML attached property to set on the specified child element of a MapControl.

See Also

SetNormalizedAnchorPoint(DependencyObject, Point) SetNormalizedAnchorPoint(DependencyObject, Point) SetNormalizedAnchorPoint(DependencyObject, Point) SetNormalizedAnchorPoint(DependencyObject, Point)

Sets the value of the MapControl.NormalizedAnchorPoint XAML attached property on the specified child element of a MapControl. The anchor point is the point on the child element that is positioned at the point on the MapControl specified by the MapControl.Location attached property.

public : static void SetNormalizedAnchorPoint(DependencyObject element, Point value)public static void SetNormalizedAnchorPoint(DependencyObject element, Point value)Public Static Function SetNormalizedAnchorPoint(element As DependencyObject, value As Point) As void// This API is not available in Javascript.
Parameters
element
DependencyObject DependencyObject DependencyObject DependencyObject

The element on which to set the property value.

value
Point Point Point Point

The value of the MapControl.NormalizedAnchorPoint XAML attached property to set on the specified child element of a MapControl.

See Also

StartContinuousPan(Double, Double) StartContinuousPan(Double, Double) StartContinuousPan(Double, Double) StartContinuousPan(Double, Double)

Starts an asynchronous operation to pan the map continuously from its current position.

public : void StartContinuousPan(double horizontalPixelsPerSecond, double verticalPixelsPerSecond)public void StartContinuousPan(Double horizontalPixelsPerSecond, Double verticalPixelsPerSecond)Public Function StartContinuousPan(horizontalPixelsPerSecond As Double, verticalPixelsPerSecond As Double) As void// This API is not available in Javascript.
Parameters
horizontalPixelsPerSecond
double Double Double Double

The pixels per second to pan horizontally.

verticalPixelsPerSecond
double Double Double Double

The pixels per second to pan vertically.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

StartContinuousRotate(Double) StartContinuousRotate(Double) StartContinuousRotate(Double) StartContinuousRotate(Double)

Starts an asynchronous operation to rotate the map's camera continuously from its current position.

public : void StartContinuousRotate(double rateInDegreesPerSecond)public void StartContinuousRotate(Double rateInDegreesPerSecond)Public Function StartContinuousRotate(rateInDegreesPerSecond As Double) As void// This API is not available in Javascript.
Parameters
rateInDegreesPerSecond
double Double Double Double

The degrees that the map's camera rotates per second in a horizontal clockwise direction.

Remarks

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

StartContinuousTilt(Double) StartContinuousTilt(Double) StartContinuousTilt(Double) StartContinuousTilt(Double)

Starts an asynchronous operation to tilt the map's camera continuously from its current position.

public : void StartContinuousTilt(double rateInDegreesPerSecond)public void StartContinuousTilt(Double rateInDegreesPerSecond)Public Function StartContinuousTilt(rateInDegreesPerSecond As Double) As void// This API is not available in Javascript.
Parameters
rateInDegreesPerSecond
double Double Double Double

The degrees of Pitch that the map's camera tilts down to the ground per second.

Remarks

For more information about tilt, see the remarks section of the MapCamera(Geopoint, Double, Double, Double, Double) overload.

StartContinuousZoom(Double) StartContinuousZoom(Double) StartContinuousZoom(Double) StartContinuousZoom(Double)

Starts an asynchronous operation to zoom in continuously until the map's maximum ZoomLevel is reached.

public : void StartContinuousZoom(double rateOfChangePerSecond)public void StartContinuousZoom(Double rateOfChangePerSecond)Public Function StartContinuousZoom(rateOfChangePerSecond As Double) As void// This API is not available in Javascript.
Parameters
rateOfChangePerSecond
double Double Double Double

The change in ZoomLevel per second.

Remarks

The maximum and minimum values of ZoomLevel depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
ZoomLevel1-201-2024-26

When leaving a Streetside view, the map returns to the previous view settings. The Streetside ZoomLevel is not maintained outside of the Streetside experience.

StopContinuousPan() StopContinuousPan() StopContinuousPan() StopContinuousPan()

Stops an asynchronous operation to pan the map continuously from its current position.

public : void StopContinuousPan()public void StopContinuousPan()Public Function StopContinuousPan() As void// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

StopContinuousRotate() StopContinuousRotate() StopContinuousRotate() StopContinuousRotate()

Stops an asynchronous operation to rotate the map's camera continuously from its current position.

public : void StopContinuousRotate()public void StopContinuousRotate()Public Function StopContinuousRotate() As void// This API is not available in Javascript.

StopContinuousTilt() StopContinuousTilt() StopContinuousTilt() StopContinuousTilt()

Stops an asynchronous operation to tilt the map's camera continuously from its current position.

public : void StopContinuousTilt()public void StopContinuousTilt()Public Function StopContinuousTilt() As void// This API is not available in Javascript.

StopContinuousZoom() StopContinuousZoom() StopContinuousZoom() StopContinuousZoom()

Stops an asynchronous operation to zoom in continuously until the map's maximum ZoomLevel is reached.

public : void StopContinuousZoom()public void StopContinuousZoom()Public Function StopContinuousZoom() As void// This API is not available in Javascript.

TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint) TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

Converts a point on the map to a geographic location by using the specified altitude reference system.

public : PlatForm::Boolean TryGetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, Geopoint location)public bool TryGetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, Geopoint location)Public Function TryGetLocationFromOffset(offset As Point, desiredReferenceSystem As AltitudeReferenceSystem, location As Geopoint) As bool// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

A point on the map to convert to a geographic location.

desiredReferenceSystem
AltitudeReferenceSystem AltitudeReferenceSystem AltitudeReferenceSystem AltitudeReferenceSystem

The altitude reference system of the geographic point. A value of Unspecified for the altitude reference system has the same effect as using the default TryGetLocationFromOffset(Windows.Foundation.Point offset, Windows.Devices.Geolocation.Geopoint location) overload.

location
Geopoint Geopoint Geopoint Geopoint

When this method returns, contains the corresponding geographic location.

Returns
PlatForm::Boolean bool bool bool

Returns true if the location is invalid; otherwise, false.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Use this method instead of the GetLocationFromOffset method. The GetLocationFromOffset method has been deprecated.

TryGetLocationFromOffset(Point, Geopoint) TryGetLocationFromOffset(Point, Geopoint) TryGetLocationFromOffset(Point, Geopoint) TryGetLocationFromOffset(Point, Geopoint)

Converts a point on the map to a geographic location.

public : PlatForm::Boolean TryGetLocationFromOffset(Point offset, Geopoint location)public bool TryGetLocationFromOffset(Point offset, Geopoint location)Public Function TryGetLocationFromOffset(offset As Point, location As Geopoint) As bool// This API is not available in Javascript.
Parameters
offset
Point Point Point Point

A point on the map to convert to a geographic location.

location
Geopoint Geopoint Geopoint Geopoint

When this method returns, contains the corresponding geographic location.

Returns
PlatForm::Boolean bool bool bool

Returns true if the location is invalid; otherwise, false.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Use this method instead of the GetLocationFromOffset method. The GetLocationFromOffset method has been deprecated.

TryPanAsync(Double, Double) TryPanAsync(Double, Double) TryPanAsync(Double, Double) TryPanAsync(Double, Double)

Starts an asynchronous operation to pan the map from its current position.

public : IAsyncOperation<PlatForm::Boolean> TryPanAsync(double horizontalPixels, double verticalPixels)public IAsyncOperation<bool> TryPanAsync(Double horizontalPixels, Double verticalPixels)Public Function TryPanAsync(horizontalPixels As Double, verticalPixels As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
horizontalPixels
double Double Double Double

The pixels to pan horizontally.

verticalPixels
double Double Double Double

The pixels to pan vertically.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

TryPanToAsync(Geopoint) TryPanToAsync(Geopoint) TryPanToAsync(Geopoint) TryPanToAsync(Geopoint)

Starts an asynchronous operation to pan the map to a specific location.

public : IAsyncOperation<PlatForm::Boolean> TryPanToAsync(Geopoint location)public IAsyncOperation<bool> TryPanToAsync(Geopoint location)Public Function TryPanToAsync(location As Geopoint) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
location
Geopoint Geopoint Geopoint Geopoint

The coordinates of a geographic location to which you want to pan the map.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

TryRotateAsync(Double) TryRotateAsync(Double) TryRotateAsync(Double) TryRotateAsync(Double)

Starts an asynchronous operation to rotate the map's camera from its current position.

public : IAsyncOperation<PlatForm::Boolean> TryRotateAsync(double degrees)public IAsyncOperation<bool> TryRotateAsync(Double degrees)Public Function TryRotateAsync(degrees As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
degrees
double Double Double Double

The degrees that the map's camera rotates in a horizontal clockwise direction.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

Consider this method when you want to replace the default UI control with your own.

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

TryRotateToAsync(Double) TryRotateToAsync(Double) TryRotateToAsync(Double) TryRotateToAsync(Double)

Starts an asynchronous operation to rotate the map's camera to a specific orientation.

public : IAsyncOperation<PlatForm::Boolean> TryRotateToAsync(double angleInDegrees)public IAsyncOperation<bool> TryRotateToAsync(Double angleInDegrees)Public Function TryRotateToAsync(angleInDegrees As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
angleInDegrees
double Double Double Double

The final Heading of the map's camera, in degrees.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

See the remarks section of the TryRotateAsync method.

TrySetSceneAsync(MapScene) TrySetSceneAsync(MapScene) TrySetSceneAsync(MapScene) TrySetSceneAsync(MapScene)

Sets the scene of the map displayed in the MapControl using the specified scene.

public : IAsyncOperation<PlatForm::Boolean> TrySetSceneAsync(MapScene scene)public IAsyncOperation<bool> TrySetSceneAsync(MapScene scene)Public Function TrySetSceneAsync(scene As MapScene) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
scene
MapScene MapScene MapScene MapScene

Defines the item or area to appear in the map.

Returns

true if the asynchronous operation succeeded; otherwise, false.

See Also

TrySetSceneAsync(MapScene, MapAnimationKind) TrySetSceneAsync(MapScene, MapAnimationKind) TrySetSceneAsync(MapScene, MapAnimationKind) TrySetSceneAsync(MapScene, MapAnimationKind)

Sets the scene of the map displayed in the MapControl using the specified scene and animation.

public : IAsyncOperation<PlatForm::Boolean> TrySetSceneAsync(MapScene scene, MapAnimationKind animationKind)public IAsyncOperation<bool> TrySetSceneAsync(MapScene scene, MapAnimationKind animationKind)Public Function TrySetSceneAsync(scene As MapScene, animationKind As MapAnimationKind) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
scene
MapScene MapScene MapScene MapScene

Defines the item or area to appear in the map.

animationKind
MapAnimationKind MapAnimationKind MapAnimationKind MapAnimationKind

Specifies the animation to use when you change the scene of the map.

Returns

true if the asynchronous operation succeeded; otherwise, false.

See Also

TrySetViewAsync(Geopoint) TrySetViewAsync(Geopoint) TrySetViewAsync(Geopoint) TrySetViewAsync(Geopoint)

Sets the view of the map displayed in the MapControl using the specified center.

public : IAsyncOperation<PlatForm::Boolean> TrySetViewAsync(Geopoint center)public IAsyncOperation<bool> TrySetViewAsync(Geopoint center)Public Function TrySetViewAsync(center As Geopoint) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
center
Geopoint Geopoint Geopoint Geopoint

The center to use in the view. For more info, see the Center property.

Returns

true if the asynchronous operation succeeded; otherwise, false.

See Also

TrySetViewAsync(Geopoint, IReference) TrySetViewAsync(Geopoint, IReference) TrySetViewAsync(Geopoint, IReference) TrySetViewAsync(Geopoint, IReference)

Sets the view of the map displayed in the MapControl using the specified center and zoom level.

public : IAsyncOperation<PlatForm::Boolean> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel)public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, Nullable<Double> zoomLevel)Public Function TrySetViewAsync(center As Geopoint, zoomLevel As Nullable<Double>) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
center
Geopoint Geopoint Geopoint Geopoint

The center to use in the view. For more info, see the Center property.

zoomLevel
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The zoom level to use in the view. For more info, see the ZoomLevel property.

Returns

true if the asynchronous operation succeeded; otherwise, false.

Remarks

The maximum and minimum values of ZoomLevel depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
ZoomLevel1-201-2024-26

When leaving a Streetside view, the map returns to the previous view settings. The Streetside ZoomLevel is not maintained outside of the Streetside experience.

See Also

TrySetViewAsync(Geopoint, IReference, IReference, IReference) TrySetViewAsync(Geopoint, IReference, IReference, IReference) TrySetViewAsync(Geopoint, IReference, IReference, IReference) TrySetViewAsync(Geopoint, IReference, IReference, IReference)

Sets the view of the map displayed in the MapControl using the specified center, zoom level, heading, and pitch.

public : IAsyncOperation<PlatForm::Boolean> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch)public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, Nullable<Double> zoomLevel, Nullable<Double> heading, Nullable<Double> desiredPitch)Public Function TrySetViewAsync(center As Geopoint, zoomLevel As Nullable<Double>, heading As Nullable<Double>, desiredPitch As Nullable<Double>) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
center
Geopoint Geopoint Geopoint Geopoint

The center to use in the view. For more info, see the Center property.

zoomLevel
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The zoom level to use in the view. For more info, see the ZoomLevel property.

heading
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The heading to use in the view. For more info, see the Heading property.

desiredPitch
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The pitch to use in the view. For more info, see the DesiredPitch property.

Returns

true if the asynchronous operation succeeded; otherwise, false.

Remarks

The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
pitch/tilt0-750-900-180
ZoomLevel1-201-2024-26

For more information, see the TrySetViewAsync(Geopoint, IReference(Double), IReference(Double), IReference(Double), MapAnimationKind) overload.

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

See Also

TrySetViewAsync(Geopoint, IReference, IReference, IReference, MapAnimationKind) TrySetViewAsync(Geopoint, IReference, IReference, IReference, MapAnimationKind) TrySetViewAsync(Geopoint, IReference, IReference, IReference, MapAnimationKind) TrySetViewAsync(Geopoint, IReference, IReference, IReference, MapAnimationKind)

Sets the view of the map displayed in the MapControl using the specified center, zoom level, heading, and pitch. The view change uses the specified animation.

public : IAsyncOperation<PlatForm::Boolean> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch, MapAnimationKind animation)public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, Nullable<Double> zoomLevel, Nullable<Double> heading, Nullable<Double> desiredPitch, MapAnimationKind animation)Public Function TrySetViewAsync(center As Geopoint, zoomLevel As Nullable<Double>, heading As Nullable<Double>, desiredPitch As Nullable<Double>, animation As MapAnimationKind) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
center
Geopoint Geopoint Geopoint Geopoint

The center to use in the view. For more info, see the Center property.

zoomLevel
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The zoom level to use in the view. For more info, see the ZoomLevel property.

heading
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The heading to use in the view. For more info, see the Heading property.

desiredPitch
IReference<double> Nullable<Double> Nullable<Double> Nullable<Double>

The pitch to use in the view. For more info, see the DesiredPitch property.

animation
MapAnimationKind MapAnimationKind MapAnimationKind MapAnimationKind

The animation to use when changing the view. For more info, see MapAnimationKind.

Returns

true if the asynchronous operation succeeded; otherwise, false.

Remarks

The valid range of pitch and zoom level differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current pitch value will be truncated to the nearest acceptable value in the next view.

When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.

The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
pitch/tilt0-750-900-180
ZoomLevel1-201-2024-26

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

See Also

TrySetViewBoundsAsync(GeoboundingBox, IReference, MapAnimationKind) TrySetViewBoundsAsync(GeoboundingBox, IReference, MapAnimationKind) TrySetViewBoundsAsync(GeoboundingBox, IReference, MapAnimationKind) TrySetViewBoundsAsync(GeoboundingBox, IReference, MapAnimationKind)

Sets the view of the map displayed in the MapControl to the contents of the specified GeoboundingBox with the specified margin. The view change uses the specified animation.

public : IAsyncOperation<PlatForm::Boolean> TrySetViewBoundsAsync(GeoboundingBox bounds, IReference<Thickness> margin, MapAnimationKind animation)public IAsyncOperation<bool> TrySetViewBoundsAsync(GeoboundingBox bounds, Nullable<Thickness> margin, MapAnimationKind animation)Public Function TrySetViewBoundsAsync(bounds As GeoboundingBox, margin As Nullable<Thickness>, animation As MapAnimationKind) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
bounds
GeoboundingBox GeoboundingBox GeoboundingBox GeoboundingBox

The geographic area to display in the view.

margin
IReference<Thickness> Nullable<Thickness> Nullable<Thickness> Nullable<Thickness>

The margin to use in the view.

animation
MapAnimationKind MapAnimationKind MapAnimationKind MapAnimationKind

The animation to use when changing the view. For more info, see MapAnimationKind.

Returns

true if the asynchronous operation succeeded; otherwise, false.

Remarks

If the area specified by the GeoboundingBox doesn't fill the MapControl, the control also displays the surrounding area outside the GeoboundingBox.

See Also

TryTiltAsync(Double) TryTiltAsync(Double) TryTiltAsync(Double) TryTiltAsync(Double)

Starts an asynchronous operation to tilt the map's camera from its current position.

public : IAsyncOperation<PlatForm::Boolean> TryTiltAsync(double degrees)public IAsyncOperation<bool> TryTiltAsync(Double degrees)Public Function TryTiltAsync(degrees As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
degrees
double Double Double Double

The degrees of Pitch that the map's camera tilts down to the ground.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

Consider this method when you want to replace the default UI control with your own.

The valid range of tilt differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current tilt value will be truncated to the nearest acceptable value in the next view.

When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.

The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
pitch/tilt0-750-900-180

TryTiltToAsync(Double) TryTiltToAsync(Double) TryTiltToAsync(Double) TryTiltToAsync(Double)

Starts an asynchronous operation to tilt the map's camera to a specific orientation.

public : IAsyncOperation<PlatForm::Boolean> TryTiltToAsync(double angleInDegrees)public IAsyncOperation<bool> TryTiltToAsync(Double angleInDegrees)Public Function TryTiltToAsync(angleInDegrees As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
angleInDegrees
double Double Double Double

The final Pitch of the map's camera in degrees.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

See the remarks section of the TryTiltAsync method.

TryZoomInAsync() TryZoomInAsync() TryZoomInAsync() TryZoomInAsync()

Starts an asynchronous operation to zoom in, increasing the map's ZoomLevel by one.

public : IAsyncOperation<PlatForm::Boolean> TryZoomInAsync()public IAsyncOperation<bool> TryZoomInAsync()Public Function TryZoomInAsync() As IAsyncOperation( Of bool )// This API is not available in Javascript.
Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

Warning

We don't recommend changing ZoomLevel with 3D views. When the MapControl's view is not looking "straight-down," changes in ZoomLevel can lead to unpredictable behavior.

ZoomLevel is intended for 2D views. To implement a "zoom" effect with 3D views, use the MapControl's TrySetSceneAsync method to move the camera closer. Start by setting a closer Location on a MapCamera object. Next, create a new MapScene by passing that MapCamera to CreateFromCamera. Finally, initiate the zoom by passing the new MapScene to TrySetSceneAsync. You can zoom in immediately or specify MapAnimationKind to create an animated "fly in".

The maximum and minimum values of ZoomLevel depend on the type of map view: 2D, 3D, or Streetside.

Property2D range3D rangeStreetside range
ZoomLevel1-201-2024-26

When leaving a Streetside view, the map returns to the previous view settings. The Streetside ZoomLevel is not maintained outside of the Streetside experience.

Consider this method when you want to replace the default UI control with your own.

TryZoomOutAsync() TryZoomOutAsync() TryZoomOutAsync() TryZoomOutAsync()

Starts an asynchronous operation to zoom out, decreasing the map's ZoomLevel by one.

public : IAsyncOperation<PlatForm::Boolean> TryZoomOutAsync()public IAsyncOperation<bool> TryZoomOutAsync()Public Function TryZoomOutAsync() As IAsyncOperation( Of bool )// This API is not available in Javascript.
Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

See the remarks section of the TryZoomInAsync method.

TryZoomToAsync(Double) TryZoomToAsync(Double) TryZoomToAsync(Double) TryZoomToAsync(Double)

Starts an asynchronous operation to zoom the map to a specific ZoomLevel.

public : IAsyncOperation<PlatForm::Boolean> TryZoomToAsync(double zoomLevel)public IAsyncOperation<bool> TryZoomToAsync(Double zoomLevel)Public Function TryZoomToAsync(zoomLevel As Double) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
zoomLevel
double Double Double Double

The final zoom level of the map, between 1 and 20.

Returns

Contains the results of the operation: true if the operation completed successfully; otherwise, false.

Remarks

See the remarks section of the TryZoomInAsync method.

Events

ActualCameraChanged ActualCameraChanged ActualCameraChanged ActualCameraChanged

Occurs when the current position of the map's camera has changed.

public : event TypedEventHandler ActualCameraChanged<MapControl,  MapActualCameraChangedEventArgs>public event TypedEventHandler ActualCameraChanged<MapControl,  MapActualCameraChangedEventArgs>Public Event ActualCameraChanged<MapControl,  MapActualCameraChangedEventArgs>// This API is not available in Javascript.

Remarks

During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.

ActualCameraChanging ActualCameraChanging ActualCameraChanging ActualCameraChanging

Occurs when the current position of the map's camera changes.

public : event TypedEventHandler ActualCameraChanging<MapControl,  MapActualCameraChangingEventArgs>public event TypedEventHandler ActualCameraChanging<MapControl,  MapActualCameraChangingEventArgs>Public Event ActualCameraChanging<MapControl,  MapActualCameraChangingEventArgs>// This API is not available in Javascript.

Remarks

During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.

CenterChanged CenterChanged CenterChanged CenterChanged

Occurs when the value of the Center property of the MapControl changes.

public : event TypedEventHandler CenterChanged<MapControl,  object>public event TypedEventHandler CenterChanged<MapControl,  object>Public Event CenterChanged<MapControl,  object>// This API is not available in Javascript.
See Also

CustomExperienceChanged CustomExperienceChanged CustomExperienceChanged CustomExperienceChanged

Occurs when the custom experience of the MapControl changes.

public : event TypedEventHandler CustomExperienceChanged<MapControl,  MapCustomExperienceChangedEventArgs>public event TypedEventHandler CustomExperienceChanged<MapControl,  MapCustomExperienceChangedEventArgs>Public Event CustomExperienceChanged<MapControl,  MapCustomExperienceChangedEventArgs>// This API is not available in Javascript.

Remarks

Custom experiences change the way maps appear in the MapControl. For example, the StreetsideExperience changes the perspective of the map to appear as though you were viewing a location from the street level. Entering or existing a street-level view will trigger the CustomExperienceChanged event.

HeadingChanged HeadingChanged HeadingChanged HeadingChanged

Occurs when the value of the Heading property of the MapControl changes.

public : event TypedEventHandler HeadingChanged<MapControl,  object>public event TypedEventHandler HeadingChanged<MapControl,  object>Public Event HeadingChanged<MapControl,  object>// This API is not available in Javascript.
See Also

LoadingStatusChanged LoadingStatusChanged LoadingStatusChanged LoadingStatusChanged

Occurs when the value of the LoadingStatus property of the MapControl changes.

public : event TypedEventHandler LoadingStatusChanged<MapControl,  object>public event TypedEventHandler LoadingStatusChanged<MapControl,  object>Public Event LoadingStatusChanged<MapControl,  object>// This API is not available in Javascript.
See Also

MapContextRequested MapContextRequested MapContextRequested MapContextRequested

Occurs when the user has completed a context input gesture on a map, such as a right-click.

public : event TypedEventHandler MapContextRequested<MapControl,  MapContextRequestedEventArgs>public event TypedEventHandler MapContextRequested<MapControl,  MapContextRequestedEventArgs>Public Event MapContextRequested<MapControl,  MapContextRequestedEventArgs>// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

MapDoubleTapped MapDoubleTapped MapDoubleTapped MapDoubleTapped

Occurs when the user double-taps the MapControl. An instance of MapInputEventArgs provides data for this event.

public : event TypedEventHandler MapDoubleTapped<MapControl,  MapInputEventArgs>public event TypedEventHandler MapDoubleTapped<MapControl,  MapInputEventArgs>Public Event MapDoubleTapped<MapControl,  MapInputEventArgs>// This API is not available in Javascript.
See Also

MapElementClick MapElementClick MapElementClick MapElementClick

Occurs when the user taps or clicks a MapElement on the MapControl.

public : event TypedEventHandler MapElementClick<MapControl,  MapElementClickEventArgs>public event TypedEventHandler MapElementClick<MapControl,  MapElementClickEventArgs>Public Event MapElementClick<MapControl,  MapElementClickEventArgs>// This API is not available in Javascript.

Remarks

Touch, mouse, and pen/stylus interactions are received, processed, and managed as pointers. Any of these devices and their interactions can produce a MapElementClick event. An instance of MapElementClickEventArgs provides data for this event.

MapElementPointerEntered MapElementPointerEntered MapElementPointerEntered MapElementPointerEntered

Occurs when a pointer moves into the bounding area of a MapElement on a MapControl.

public : event TypedEventHandler MapElementPointerEntered<MapControl,  MapElementPointerEnteredEventArgs>public event TypedEventHandler MapElementPointerEntered<MapControl,  MapElementPointerEnteredEventArgs>Public Event MapElementPointerEntered<MapControl,  MapElementPointerEnteredEventArgs>// This API is not available in Javascript.

Remarks

Mouse interactions are received, processed, and managed as pointers. The MapElementPointerEntered event is triggered as the user moves their mouse over an element. An instance of MapElementPointerEnteredEventArgs provides data for this event.

MapElementPointerExited MapElementPointerExited MapElementPointerExited MapElementPointerExited

Occurs when a pointer moves out of the bounding area of a MapElement on a MapControl.

public : event TypedEventHandler MapElementPointerExited<MapControl,  MapElementPointerExitedEventArgs>public event TypedEventHandler MapElementPointerExited<MapControl,  MapElementPointerExitedEventArgs>Public Event MapElementPointerExited<MapControl,  MapElementPointerExitedEventArgs>// This API is not available in Javascript.

Remarks

Mouse interactions are received, processed, and managed as pointers. The MapElementPointerExited event is triggered as the user moves their mouse out from over an element. An instance of MapElementPointerExitedEventArgs provides data for this event.

MapHolding MapHolding MapHolding MapHolding

Occurs when the user taps and holds on the MapControl. An instance of MapInputEventArgs provides data for this event.

public : event TypedEventHandler MapHolding<MapControl,  MapInputEventArgs>public event TypedEventHandler MapHolding<MapControl,  MapInputEventArgs>Public Event MapHolding<MapControl,  MapInputEventArgs>// This API is not available in Javascript.
See Also

MapRightTapped MapRightTapped MapRightTapped MapRightTapped

Occurs when the user presses-and-holds the MapControl or clicks on it using the right mouse button. An instance of MapRightTappedEventArgs provides data for this event.

public : event TypedEventHandler MapRightTapped<MapControl,  MapRightTappedEventArgs>public event TypedEventHandler MapRightTapped<MapControl,  MapRightTappedEventArgs>Public Event MapRightTapped<MapControl,  MapRightTappedEventArgs>// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

MapTapped MapTapped MapTapped MapTapped

Occurs when the user taps the MapControl or clicks on it with the left mouse button. An instance of MapInputEventArgs provides data for this event.

public : event TypedEventHandler MapTapped<MapControl,  MapInputEventArgs>public event TypedEventHandler MapTapped<MapControl,  MapInputEventArgs>Public Event MapTapped<MapControl,  MapInputEventArgs>// This API is not available in Javascript.
See Also

PitchChanged PitchChanged PitchChanged PitchChanged

Occurs when the value of the Pitch property of the MapControl changes.

public : event TypedEventHandler PitchChanged<MapControl,  object>public event TypedEventHandler PitchChanged<MapControl,  object>Public Event PitchChanged<MapControl,  object>// This API is not available in Javascript.
See Also

TargetCameraChanged TargetCameraChanged TargetCameraChanged TargetCameraChanged

Occurs when the final position of the map's camera has changed.

public : event TypedEventHandler TargetCameraChanged<MapControl,  MapTargetCameraChangedEventArgs>public event TypedEventHandler TargetCameraChanged<MapControl,  MapTargetCameraChangedEventArgs>Public Event TargetCameraChanged<MapControl,  MapTargetCameraChangedEventArgs>// This API is not available in Javascript.

Remarks

During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.

TransformOriginChanged TransformOriginChanged TransformOriginChanged TransformOriginChanged

Occurs when the value of the TransformOrigin property of the MapControl changes.

public : event TypedEventHandler TransformOriginChanged<MapControl,  object>public event TypedEventHandler TransformOriginChanged<MapControl,  object>Public Event TransformOriginChanged<MapControl,  object>// This API is not available in Javascript.
See Also

ZoomLevelChanged ZoomLevelChanged ZoomLevelChanged ZoomLevelChanged

Occurs when the value of the ZoomLevel property of the MapControl changes.

public : event TypedEventHandler ZoomLevelChanged<MapControl,  object>public event TypedEventHandler ZoomLevelChanged<MapControl,  object>Public Event ZoomLevelChanged<MapControl,  object>// This API is not available in Javascript.
See Also

See Also