PlaceInfo 클래스

정의

사용자가 창 바깥쪽을 클릭할 때 자동으로 닫는 밝은 해제 가능한 창에서 해당 위치를 설명하는 지도 위치 및 정보를 표시합니다.

public ref class PlaceInfo sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PlaceInfo final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PlaceInfo
Public NotInheritable Class PlaceInfo
상속
Object IInspectable PlaceInfo
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

이 예제에서는 사용자가 해당 위치를 보기 위해 클릭하는 단추 아래의 시애틀 스페이스 니들의 위치를 보여 줍니다.

private void SpaceNeedle_Click(object sender, RoutedEventArgs e)
{
    Geopoint spaceNeedlePoint = new Geopoint
        (new BasicGeoposition { Latitude = 47.6205, Longitude = -122.3493 });

    PlaceInfoCreateOptions options = new PlaceInfoCreateOptions();

    options.DisplayAddress = "400 Broad St, Seattle, WA 98109";
    options.DisplayName = "Seattle Space Needle";

    PlaceInfo spaceNeedlePlace =  PlaceInfo.Create(spaceNeedlePoint, options);

    FrameworkElement targetElement = (FrameworkElement)sender;

    GeneralTransform generalTransform =
        targetElement.TransformToVisual((FrameworkElement)targetElement.Parent);

    Rect rectangle = generalTransform.TransformBounds(new Rect(new Point
        (targetElement.Margin.Left, targetElement.Margin.Top), targetElement.RenderSize));

    spaceNeedlePlace.Show(rectangle, Windows.UI.Popups.Placement.Below);
}

설명

버전 기록

Windows 버전 SDK 버전 추가된 값
1803 17134 CreateFromAddress(String)
1803 17134 CreateFromAddress(String,String)

속성

DisplayAddress

에 연결된 PlaceInfo주소를 가져옵니다.

DisplayName

에 연결된 PlaceInfo표시 이름을 가져옵니다.

Geoshape

에 연결된 지리적 도형을 PlaceInfo가져옵니다.

Identifier

에 연결된 PlaceInfo식별자를 가져옵니다.

IsShowSupported

현재 컨텍스트에 따라 앱에 지도 위치 및 관련 정보가 포함된 해제 가능한 창을 표시할 수 있는지 여부를 나타내는 값을 가져옵니다.

메서드

Create(Geopoint)

PlaceInfo 인스턴스를 만듭니다.

Create(Geopoint, PlaceInfoCreateOptions)

PlaceInfo 인스턴스를 만듭니다.

CreateFromAddress(String)

PlaceInfo 주소를 사용하여 인스턴스를 만듭니다.

CreateFromAddress(String, String)

PlaceInfo 주소와 표시 이름을 사용하여 인스턴스를 만듭니다.

CreateFromIdentifier(String)

PlaceInfo 인스턴스를 만듭니다.

CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions)

PlaceInfo 인스턴스를 만듭니다.

CreateFromMapLocation(MapLocation)

PlaceInfo 인스턴스를 만듭니다.

Show(Rect)

팝업 창, 지도 위치 및 에 설명 PlaceInfo된 관련 정보를 표시합니다.

Show(Rect, Placement)

밝은 해제 가능한 창, 지도 위치 및 에 설명 PlaceInfo된 관련 정보를 표시합니다.

적용 대상