MapControl.TryGetLocationFromOffset 方法

定義

多載

TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

使用指定的高度參考系統,將地圖上的點轉換為地理位置。

TryGetLocationFromOffset(Point, Geopoint)

將地圖上的點轉換成地理位置。

TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

使用指定的高度參考系統,將地圖上的點轉換為地理位置。

public:
 virtual bool TryGetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, [Out] Geopoint ^ & location) = TryGetLocationFromOffset;
/// [Windows.Foundation.Metadata.Overload("TryGetLocationFromOffsetWithReferenceSystem")]
bool TryGetLocationFromOffset(Point const& offset, AltitudeReferenceSystem const& desiredReferenceSystem, [Out] Geopoint const& & location);
[Windows.Foundation.Metadata.Overload("TryGetLocationFromOffsetWithReferenceSystem")]
public bool TryGetLocationFromOffset(Point offset, AltitudeReferenceSystem desiredReferenceSystem, out Geopoint location);
Public Function TryGetLocationFromOffset (offset As Point, desiredReferenceSystem As AltitudeReferenceSystem, ByRef location As Geopoint) As Boolean

參數

offset
Point

地圖上要轉換成地理位置的點。

desiredReferenceSystem
AltitudeReferenceSystem

地理點的高度參考系統。 高度參考系統的 [ 未指定 ] 值與使用預設 TryGetLocationFromOffset (Windows.Foundation.Point 位移、Windows.Devices.Geolocation.Geopoint 位置) 多載的效果相同。

location
Geopoint

當這個方法傳回時,會包含對應的地理位置。

傳回

Boolean

bool

如果位置無效,則傳回 true ;否則為 false

屬性

Windows 需求

裝置系列
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)

備註

請使用這個方法,而不是 GetLocationFromOffset 方法。 GetLocationFromOffset方法已被取代。

適用於

TryGetLocationFromOffset(Point, Geopoint)

將地圖上的點轉換成地理位置。

public:
 virtual bool TryGetLocationFromOffset(Point offset, [Out] Geopoint ^ & location) = TryGetLocationFromOffset;
/// [Windows.Foundation.Metadata.Overload("TryGetLocationFromOffset")]
bool TryGetLocationFromOffset(Point const& offset, [Out] Geopoint const& & location);
[Windows.Foundation.Metadata.Overload("TryGetLocationFromOffset")]
public bool TryGetLocationFromOffset(Point offset, out Geopoint location);
Public Function TryGetLocationFromOffset (offset As Point, ByRef location As Geopoint) As Boolean

參數

offset
Point

地圖上要轉換成地理位置的點。

location
Geopoint

當這個方法傳回時,會包含對應的地理位置。

傳回

Boolean

bool

如果位置無效,則傳回 true ;否則為 false

屬性

Windows 需求

裝置系列
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)

備註

請使用這個方法,而不是 GetLocationFromOffset 方法。 GetLocationFromOffset方法已被取代。

適用於