MapControl.TrySetViewAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, 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. |
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>) |
Sets the view of the map displayed in the MapControl using the specified center, zoom level, heading, and pitch. |
TrySetViewAsync(Geopoint, IReference<Double>) |
Sets the view of the map displayed in the MapControl using the specified center and zoom level. |
TrySetViewAsync(Geopoint) |
Sets the view of the map displayed in the MapControl using the specified center. |
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, 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:
virtual IAsyncOperation<bool> ^ TrySetViewAsync(Geopoint ^ center, IReference<double> ^ zoomLevel, IReference<double> ^ heading, IReference<double> ^ desiredPitch, MapAnimationKind animation) = TrySetViewAsync;
/// [Windows.Foundation.Metadata.Overload("TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetViewAsync(Geopoint const& center, IReference<double> const& zoomLevel, IReference<double> const& heading, IReference<double> const& desiredPitch, MapAnimationKind const& animation);
[Windows.Foundation.Metadata.Overload("TrySetViewWithCenterZoomHeadingPitchAndAnimationAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, System.Nullable<double> zoomLevel, System.Nullable<double> heading, System.Nullable<double> desiredPitch, MapAnimationKind animation);
function trySetViewAsync(center, zoomLevel, heading, desiredPitch, animation)
Public Function TrySetViewAsync (center As Geopoint, zoomLevel As Nullable(Of Double), heading As Nullable(Of Double), desiredPitch As Nullable(Of Double), animation As MapAnimationKind) As IAsyncOperation(Of Boolean)
Parameters
- zoomLevel
-
IReference<double>
The zoom level to use in the view. For more info, see the ZoomLevel property.
- heading
-
IReference<double>
The heading to use in the view. For more info, see the Heading property.
- desiredPitch
-
IReference<double>
The pitch to use in the view. For more info, see the DesiredPitch property.
- animation
- MapAnimationKind
The animation to use when changing the view. For more info, see MapAnimationKind.
Returns
true if the asynchronous operation succeeded; otherwise, false.
- Attributes
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.
Property | 2D range | 3D range | Streetside range |
---|---|---|---|
pitch/tilt | 0-75 | 0-90 | 0-180 |
ZoomLevel | 1-20 | 1-20 | 24-26 |
Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.
See also
- TrySetViewAsync(Geopoint)
- TrySetViewAsync(Geopoint, IReference<Double>)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)
- Display maps with 2D, 3D, and Streetside views
Applies to
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)
Sets the view of the map displayed in the MapControl using the specified center, zoom level, heading, and pitch.
public:
virtual IAsyncOperation<bool> ^ TrySetViewAsync(Geopoint ^ center, IReference<double> ^ zoomLevel, IReference<double> ^ heading, IReference<double> ^ desiredPitch) = TrySetViewAsync;
/// [Windows.Foundation.Metadata.Overload("TrySetViewWithCenterZoomHeadingAndPitchAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetViewAsync(Geopoint const& center, IReference<double> const& zoomLevel, IReference<double> const& heading, IReference<double> const& desiredPitch);
[Windows.Foundation.Metadata.Overload("TrySetViewWithCenterZoomHeadingAndPitchAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, System.Nullable<double> zoomLevel, System.Nullable<double> heading, System.Nullable<double> desiredPitch);
function trySetViewAsync(center, zoomLevel, heading, desiredPitch)
Public Function TrySetViewAsync (center As Geopoint, zoomLevel As Nullable(Of Double), heading As Nullable(Of Double), desiredPitch As Nullable(Of Double)) As IAsyncOperation(Of Boolean)
Parameters
- zoomLevel
-
IReference<double>
The zoom level to use in the view. For more info, see the ZoomLevel property.
- heading
-
IReference<double>
The heading to use in the view. For more info, see the Heading property.
- desiredPitch
-
IReference<double>
The pitch to use in the view. For more info, see the DesiredPitch property.
Returns
true if the asynchronous operation succeeded; otherwise, false.
- Attributes
Remarks
The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.
Property | 2D range | 3D range | Streetside range |
---|---|---|---|
pitch/tilt | 0-75 | 0-90 | 0-180 |
ZoomLevel | 1-20 | 1-20 | 24-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)
- TrySetViewAsync(Geopoint, IReference<Double>)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
- Display maps with 2D, 3D, and Streetside views
Applies to
TrySetViewAsync(Geopoint, IReference<Double>)
Sets the view of the map displayed in the MapControl using the specified center and zoom level.
public:
virtual IAsyncOperation<bool> ^ TrySetViewAsync(Geopoint ^ center, IReference<double> ^ zoomLevel) = TrySetViewAsync;
/// [Windows.Foundation.Metadata.Overload("TrySetViewWithCenterAndZoomAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetViewAsync(Geopoint const& center, IReference<double> const& zoomLevel);
[Windows.Foundation.Metadata.Overload("TrySetViewWithCenterAndZoomAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, System.Nullable<double> zoomLevel);
function trySetViewAsync(center, zoomLevel)
Public Function TrySetViewAsync (center As Geopoint, zoomLevel As Nullable(Of Double)) As IAsyncOperation(Of Boolean)
Parameters
- zoomLevel
-
IReference<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.
- Attributes
Remarks
The maximum and minimum values of ZoomLevel depend on the type of map view: 2D, 3D, or Streetside.
Property | 2D range | 3D range | Streetside range |
---|---|---|---|
ZoomLevel | 1-20 | 1-20 | 24-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)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
- Display maps with 2D, 3D, and Streetside views
Applies to
TrySetViewAsync(Geopoint)
Sets the view of the map displayed in the MapControl using the specified center.
public:
virtual IAsyncOperation<bool> ^ TrySetViewAsync(Geopoint ^ center) = TrySetViewAsync;
/// [Windows.Foundation.Metadata.Overload("TrySetViewWithCenterAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetViewAsync(Geopoint const& center);
[Windows.Foundation.Metadata.Overload("TrySetViewWithCenterAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center);
function trySetViewAsync(center)
Public Function TrySetViewAsync (center As Geopoint) As IAsyncOperation(Of Boolean)
Parameters
Returns
true if the asynchronous operation succeeded; otherwise, false.
- Attributes
See also
- TrySetViewAsync(Geopoint, IReference<Double>)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)
- TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
- Display maps with 2D, 3D, and Streetside views