MapBillboard MapBillboard MapBillboard Class

Definition

Displays an image that scales and fades in relation to its distance from the ReferenceCamera of the MapBillboard.

public : sealed class MapBillboard : MapElement, IMapBillboard
public sealed class MapBillboard : MapElement, IMapBillboard
Public NotInheritable Class MapBillboard Inherits MapElement Implements IMapBillboard
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

A MapBillboard is very similar to a MapIcon. Use a MapIcon to emphasize a location on a map. Because images used to mark locations are typically small, they can remain the same size as users zoom in and out on a map.

Use a MapBillboard to show things like large images that relate to map locations. As users zoom out, the image will shrink proportionally in size to enable the user to view more of the map.

Constructors

MapBillboard(MapCamera) MapBillboard(MapCamera) MapBillboard(MapCamera)

Initializes a new instance of the MapBillboard class.

public : MapBillboard(MapCamera camera)
public MapBillboard(MapCamera camera)
Public Sub New(camera As MapCamera)
Parameters
camera
MapCamera MapCamera MapCamera

The MapCamera settings that define the current position of the reference camera.

Properties

CollisionBehaviorDesired CollisionBehaviorDesired CollisionBehaviorDesired

Gets or sets the behavior of a MapBillboard when it collides with other map features due to zoom level.

public : MapElementCollisionBehavior CollisionBehaviorDesired { get; set; }
public MapElementCollisionBehavior CollisionBehaviorDesired { get; set; }
Public ReadWrite Property CollisionBehaviorDesired As MapElementCollisionBehavior
Value
MapElementCollisionBehavior MapElementCollisionBehavior MapElementCollisionBehavior

The behavior of a MapBillboard when it collides with other map features due to zoom level.

CollisionBehaviorDesiredProperty CollisionBehaviorDesiredProperty CollisionBehaviorDesiredProperty

Identifies the CollisionBehaviorDesired dependency property.

public : static DependencyProperty CollisionBehaviorDesiredProperty { get; }
public static DependencyProperty CollisionBehaviorDesiredProperty { get; }
Public Static ReadOnly Property CollisionBehaviorDesiredProperty As DependencyProperty

Dispatcher Dispatcher Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)

Image Image Image

Gets or sets the image for the MapBillboard. Provide an optional custom image to replace the default point of interest (POI) image.

public : IRandomAccessStreamReference Image { get; set; }
public IRandomAccessStreamReference Image { get; set; }
Public ReadWrite Property Image As IRandomAccessStreamReference

Remarks

The following line of code displays the MapBillboard with a custom image saved in the Assets folder of the project.

MapBillboard1.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/customicon.png"));

Location Location Location

Gets or sets the geographic location of the MapBillboard on the MapControl. The location is the geographic location on the MapControl at which the NormalizedAnchorPoint of the MapBillboard is positioned.

public : Geopoint Location { get; set; }
public Geopoint Location { get; set; }
Public ReadWrite Property Location As Geopoint
Value
Geopoint Geopoint Geopoint

The geographic location of the MapBillboard on the MapControl.

Remarks

If you provide an altitude and altitude reference system in 3D views, then MapBillboard elements added to the MapControl end up being placed underground or floating in space.

LocationProperty LocationProperty LocationProperty

Identifies the Location dependency property.

public : static DependencyProperty LocationProperty { get; }
public static DependencyProperty LocationProperty { get; }
Public Static ReadOnly Property LocationProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Location dependency property.

MapStyleSheetEntry MapStyleSheetEntry MapStyleSheetEntry

Gets or sets the name of an entry in the map's style sheet that you'd like to apply to this MapElement.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapStyleSheetEntryProperty MapStyleSheetEntryProperty MapStyleSheetEntryProperty

Identifies for the MapStyleSheetEntry dependency property.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapStyleSheetEntryState MapStyleSheetEntryState MapStyleSheetEntryState

Gets or sets the name of the state of this MapElement. If the style sheet defines a style for that state, that style is applied to this element. Values defined in the style sheet for the state override values defined in the MapStyleSheetEntry.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapStyleSheetEntryStateProperty MapStyleSheetEntryStateProperty MapStyleSheetEntryStateProperty

Identifies for the MapStyleSheetEntryState dependency property.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapTabIndex MapTabIndex MapTabIndex

Gets or sets a value that determines the order in which elements of the MapControl receive focus when the user navigates through those elements by pressing the Tab key.

(Inherited from MapElement)

MapTabIndexProperty MapTabIndexProperty MapTabIndexProperty

Identifies the MapTabIndex dependency property.

(Inherited from MapElement)

NormalizedAnchorPoint NormalizedAnchorPoint NormalizedAnchorPoint

Gets or sets the anchor point of the MapBillboard. The anchor point is the point on the MapBillboard that is positioned at the point on the MapControl specified by the Location property.

public : Point NormalizedAnchorPoint { get; set; }
public Point NormalizedAnchorPoint { get; set; }
Public ReadWrite Property NormalizedAnchorPoint As Point
Value
Point Point Point

The anchor point of the MapBillboard.

Remarks

The default value of (0.5, 1), which represents the bottom center of the image.

NormalizedAnchorPointProperty NormalizedAnchorPointProperty NormalizedAnchorPointProperty

Identifies the NormalizedAnchorPoint dependency property.

public : static DependencyProperty NormalizedAnchorPointProperty { get; }
public static DependencyProperty NormalizedAnchorPointProperty { get; }
Public Static ReadOnly Property NormalizedAnchorPointProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the NormalizedAnchorPoint dependency property.

ReferenceCamera ReferenceCamera ReferenceCamera

Gets the MapCamera settings that define the position and orientation where the image appears at a 1x scale.

public : MapCamera ReferenceCamera { get; }
public MapCamera ReferenceCamera { get; }
Public ReadOnly Property ReferenceCamera As MapCamera
Value
MapCamera MapCamera MapCamera

The MapCamera settings that define the position and orientation where the image appears at a 1x scale.

Remarks

Because a MapBillboard image scales in and out as the ZoomLevel of the map changes, it's important to define where in that ZoomLevel the image appears at a normal 1x scale. You define that position in a Geopoint, and then pass that Geopoint as a parameter to the MapBillboard constructor.

For example, if you use the map's ActualCamera as that constructor parameter, the position defined in the reference camera becomes equal to the position defined in the maps internal camera. This becomes the position of the camera where the MapBillboard image appears at 1x scale. However, if your app gives users the ability to zoom out on the map, the image decreases in size because the maps internal camera is rising in altitude while the image at 1x scale remains fixed at the reference camera's position.

Tag Tag Tag

Gets or sets an arbitrary object value that can be used to store custom information about this object.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

TagProperty TagProperty TagProperty

Identifies the Tag dependency property.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Visible Visible Visible

Gets or sets a value that indicates whether the MapElement is visible on the MapControl.

(Inherited from MapElement)

VisibleProperty VisibleProperty VisibleProperty

Identifies the Visible dependency property.

(Inherited from MapElement)

ZIndex ZIndex ZIndex

Gets or sets the z-index of the MapElement. A MapElement with a higher z-index is displayed on top of a MapElement with a lower z-index.

(Inherited from MapElement)

ZIndexProperty ZIndexProperty ZIndexProperty

Identifies the ZIndex dependency property.

(Inherited from MapElement)

Methods

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)