共用方式為


MapControl.TrySetViewAsync 方法

定義

多載

TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)

使用指定的中心、縮放層級、標題和間距,設定 MapControl 中顯示的地圖檢視。 檢視變更會使用指定的動畫。

TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)

使用指定的中心、縮放層級、標題和間距,設定 MapControl 中顯示的地圖檢視。

TrySetViewAsync(Geopoint, IReference<Double>)

使用指定的中央和縮放層級,設定 MapControl 中顯示的地圖檢視。

TrySetViewAsync(Geopoint)

使用指定的中心設定 MapControl 中顯示的地圖檢視。

TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>, MapAnimationKind)

使用指定的中心、縮放層級、標題和間距,設定 MapControl 中顯示的地圖檢視。 檢視變更會使用指定的動畫。

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)

參數

center
Geopoint

要用於檢視的中心。 如需詳細資訊,請參閱 Center 屬性。

zoomLevel

IReference<Double>

Nullable<Double>

IReference<double>

檢視中使用的縮放層級。 如需詳細資訊,請參閱 ZoomLevel 屬性。

heading

IReference<Double>

Nullable<Double>

IReference<double>

要用於檢視的標題。 如需詳細資訊,請參閱 Heading 屬性。

desiredPitch

IReference<Double>

Nullable<Double>

IReference<double>

在檢視中使用的音調。 如需詳細資訊,請參閱 DesiredPitch 屬性。

animation
MapAnimationKind

變更檢視時要使用的動畫。 如需詳細資訊,請參閱 MapAnimationKind

傳回

如果非同步作業成功,則為true;否則為false

屬性

備註

2D、3D 和 Streetside 地圖檢視之間的間距和縮放層級有效範圍不同。 例如,從 3D 切換至 2D 時,目前檢視中可接受的值可能超出下一個檢視的範圍。 如果是這種情況,目前的間距值將會截斷為下一個檢視中最接近可接受的值。

離開 Streetside 檢視時,地圖會返回先前的檢視設定。 Streetside 間距不會在 Streetside 體驗之外維護。

間距/傾斜的最大值和最小值取決於地圖檢視的類型:2D、3D 或 Streetside。

屬性2D 範圍3D 範圍街邊範圍
傾斜/傾斜0-750-900-180
ZoomLevel1-201-2024-26

大於 360 度的標題值會正規化為相等的 0-360 度值。

另請參閱

適用於

TrySetViewAsync(Geopoint, IReference<Double>, IReference<Double>, IReference<Double>)

使用指定的中心、縮放層級、標題和間距,設定 MapControl 中顯示的地圖檢視。

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)

參數

center
Geopoint

要用於檢視的中心。 如需詳細資訊,請參閱 Center 屬性。

zoomLevel

IReference<Double>

Nullable<Double>

IReference<double>

檢視中使用的縮放層級。 如需詳細資訊,請參閱 ZoomLevel 屬性。

heading

IReference<Double>

Nullable<Double>

IReference<double>

要用於檢視的標題。 如需詳細資訊,請參閱 Heading 屬性。

desiredPitch

IReference<Double>

Nullable<Double>

IReference<double>

在檢視中使用的音調。 如需詳細資訊,請參閱 DesiredPitch 屬性。

傳回

如果非同步作業成功,則為true;否則為false

屬性

備註

間距/傾斜的最大值和最小值取決於地圖檢視的類型:2D、3D 或 Streetside。

屬性2D 範圍3D 範圍街邊範圍
傾斜/傾斜0-750-900-180
ZoomLevel1-201-2024-26

如需詳細資訊,請參閱 TrySetViewAsync (Geopoint、IReference (Double) 、IReference (Double) 、IReference (Double) 、MapAnimationKind) 多載。

大於 360 度的標題值會正規化為相等的 0-360 度值。

另請參閱

適用於

TrySetViewAsync(Geopoint, IReference<Double>)

使用指定的中央和縮放層級,設定 MapControl 中顯示的地圖檢視。

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)

參數

center
Geopoint

要用於檢視的中心。 如需詳細資訊,請參閱 Center 屬性。

zoomLevel

IReference<Double>

Nullable<Double>

IReference<double>

檢視中使用的縮放層級。 如需詳細資訊,請參閱 ZoomLevel 屬性。

傳回

如果非同步作業成功,則為true;否則為false

屬性

備註

ZoomLevel的最大值和最小值取決於地圖檢視的類型:2D、3D 或 Streetside。

屬性2D 範圍3D 範圍街邊範圍
ZoomLevel1-201-2024-26

離開 Streetside 檢視時,地圖會返回先前的檢視設定。 Streetside ZoomLevel 不會在 Streetside 體驗之外維護。

另請參閱

適用於

TrySetViewAsync(Geopoint)

使用指定的中心設定 MapControl 中顯示的地圖檢視。

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)

參數

center
Geopoint

要用於檢視的中心。 如需詳細資訊,請參閱 Center 屬性。

傳回

如果非同步作業成功,則為true;否則為false

屬性

另請參閱

適用於