PlaceInfo PlaceInfo PlaceInfo PlaceInfo PlaceInfo Class

Definition

Displays a map location and information that describes that location in a light-dismissible window which closes automatically when the user clicks outside of the window.

public : sealed class PlaceInfo : IPlaceInfo
struct winrt::Windows::Services::Maps::PlaceInfo : IPlaceInfo
public sealed class PlaceInfo : IPlaceInfo
Public NotInheritable Class PlaceInfo Implements IPlaceInfo
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Examples

This example shows the location of the Seattle Space Needle below the button that the user clicks to see that location.

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);
}

Properties

DisplayAddress DisplayAddress DisplayAddress DisplayAddress DisplayAddress

Gets the address associated with the PlaceInfo.

DisplayName DisplayName DisplayName DisplayName DisplayName

Gets the display name associated with the PlaceInfo.

Geoshape Geoshape Geoshape Geoshape Geoshape

Gets the geographical shape associated with the PlaceInfo.

Identifier Identifier Identifier Identifier Identifier

Gets the identifier associated with the PlaceInfo.

IsShowSupported IsShowSupported IsShowSupported IsShowSupported IsShowSupported

Gets a value that indicates whether your app can show a light-dismissible window that contains a map location and related information given the current context.

Methods

Create(Geopoint) Create(Geopoint) Create(Geopoint) Create(Geopoint) Create(Geopoint)

Creates a PlaceInfo instance.

Create(Geopoint, PlaceInfoCreateOptions) Create(Geopoint, PlaceInfoCreateOptions) Create(Geopoint, PlaceInfoCreateOptions) Create(Geopoint, PlaceInfoCreateOptions) Create(Geopoint, PlaceInfoCreateOptions)

Creates a PlaceInfo instance.

CreateFromAddress(String) CreateFromAddress(String) CreateFromAddress(String) CreateFromAddress(String) CreateFromAddress(String)

Creates a PlaceInfo instance by using an address.

CreateFromAddress(String, String) CreateFromAddress(String, String) CreateFromAddress(String, String) CreateFromAddress(String, String) CreateFromAddress(String, String)

Creates a PlaceInfo instance by using an address and a display name.

CreateFromIdentifier(String) CreateFromIdentifier(String) CreateFromIdentifier(String) CreateFromIdentifier(String) CreateFromIdentifier(String)

Creates a PlaceInfo instance.

CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions) CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions) CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions) CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions) CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions)

Creates a PlaceInfo instance.

CreateFromMapLocation(MapLocation) CreateFromMapLocation(MapLocation) CreateFromMapLocation(MapLocation) CreateFromMapLocation(MapLocation) CreateFromMapLocation(MapLocation)

Creates a PlaceInfo instance.

Show(Rect) Show(Rect) Show(Rect) Show(Rect) Show(Rect)

Shows in a pop-up window, the map location and related information that is described in the PlaceInfo.

Show(Rect, Placement) Show(Rect, Placement) Show(Rect, Placement) Show(Rect, Placement) Show(Rect, Placement)

Shows in a light-dismissible window, the map location and related information that is described in the PlaceInfo.