MapControl.TrySetViewAsync
MapControl.TrySetViewAsync
MapControl.TrySetViewAsync
MapControl.TrySetViewAsync
Method
Definition
Overloads
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)
IAsyncOperation<bool> TrySetViewAsync(Geopoint center) const;
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center)
Public Function TrySetViewAsync(center As Geopoint) As IAsyncOperation(Of bool)
Parameters
Returns
true if the asynchronous operation succeeded; otherwise, false.
- See also
-
TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
TrySetViewAsync(Geopoint, IReference<Double>) TrySetViewAsync(Geopoint, IReference<Double>) TrySetViewAsync(Geopoint, IReference<Double>) TrySetViewAsync(Geopoint, IReference<Double>)
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)
IAsyncOperation<bool> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel) const;
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, Nullable<Double> zoomLevel)
Public Function TrySetViewAsync(center As Geopoint, zoomLevel As Nullable(Of Double)) As IAsyncOperation(Of bool)
Parameters
- zoomLevel
- 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.
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)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>) TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>) TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>) 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 : IAsyncOperation<Platform::Boolean> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch)
IAsyncOperation<bool> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch) const;
public IAsyncOperation<bool> TrySetViewAsync(Geopoint center, Nullable<Double> zoomLevel, Nullable<Double> heading, Nullable<Double> 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 bool)
Parameters
- zoomLevel
- Nullable<Double> Nullable<Double>
The zoom level to use in the view. For more info, see the ZoomLevel property.
- heading
- Nullable<Double> Nullable<Double>
The heading to use in the view. For more info, see the Heading property.
- desiredPitch
- 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.
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)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)
TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind) TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind) TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind) 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 : IAsyncOperation<Platform::Boolean> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch, MapAnimationKind animation)
IAsyncOperation<bool> TrySetViewAsync(Geopoint center, IReference<double> zoomLevel, IReference<double> heading, IReference<double> desiredPitch, MapAnimationKind animation) const;
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(Of Double), heading As Nullable(Of Double), desiredPitch As Nullable(Of Double), animation As MapAnimationKind) As IAsyncOperation(Of bool)
Parameters
- zoomLevel
- Nullable<Double> Nullable<Double>
The zoom level to use in the view. For more info, see the ZoomLevel property.
- heading
- Nullable<Double> Nullable<Double>
The heading to use in the view. For more info, see the Heading property.
- desiredPitch
- Nullable<Double> Nullable<Double>
The pitch to use in the view. For more info, see the DesiredPitch property.
- animation
- 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.
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)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)
Feedback
Loading feedback...