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.

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.

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.

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.

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

center
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<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

center
Geopoint Geopoint

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

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.

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<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

center
Geopoint Geopoint

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

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.

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<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

center
Geopoint Geopoint

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

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.

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