MapElement3D MapElement3D MapElement3D MapElement3D Class

Definition

Represents a 3D element displayed on a MapControl.

public : sealed class MapElement3D : MapElement, IMapElement3D
struct winrt::Windows::UI::Xaml::Controls::Maps::MapElement3D : MapElement, IMapElement3D
public sealed class MapElement3D : MapElement, IMapElement3D
Public NotInheritable Class MapElement3D Inherits MapElement Implements IMapElement3D
Inheritance
MapElement3DMapElement3DMapElement3DMapElement3D
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 places a 3D element on the center of the map.

map3dSphereStreamReference = RandomAccessStreamReference.CreateFromUri
   (new Uri("ms-appx:///Assets/trainengine.3mf"));    

 var myModel = await MapModel3D.CreateFrom3MFAsync(map3dSphereStreamReference,
     MapModel3DShadingOption.Smooth);

 var my3DElement = new MapElement3D();
 my3DElement.Location = myMap.Center;
 my3DElement.Model = myModel;

 var myLayer = new MapElementsLayer();
 myLayer.MapElements.Add(my3DElement);

 myMap.Layers.Add(myLayer);

Remarks

To display the 3D object on a map control, add the MapElement3D to the MapElements collection of a MapElementsLayer. Then, add the MapElementsLayer to the Layers collection of the map.

Constructors

MapElement3D() MapElement3D() MapElement3D() MapElement3D()

Creates a MapElement3D instance.

public : MapElement3D()
MapElement3D() const;
public MapElement3D()
Public Sub New()

Properties

Dispatcher 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)

Heading Heading Heading Heading

Gets or sets the directional heading of the 3D map element in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West.

public : double Heading { get; set; }
double Heading(); void Heading(double heading);
public double Heading { get; set; }
Public ReadWrite Property Heading As double
Value
double double

The directional heading of the map in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West. The default value is 0.

Remarks

Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.

HeadingProperty HeadingProperty HeadingProperty HeadingProperty

Identifies the Heading dependency property.

public : static DependencyProperty HeadingProperty { get; }
static DependencyProperty HeadingProperty();
public static DependencyProperty HeadingProperty { get; }
Public Static ReadOnly Property HeadingProperty As DependencyProperty
Value
DependencyProperty DependencyProperty

The Heading dependency property.

IsEnabled IsEnabled IsEnabled IsEnabled

Prerelease. Indicates whether users can interact with the MapElement.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

IsEnabledProperty IsEnabledProperty IsEnabledProperty IsEnabledProperty

Prerelease. Identifies the IsEnabled dependency property.

(Inherited from MapElement)
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Location Location Location Location

Gets or sets the geographic location of the MapElement3D on the MapControl. .

public : Geopoint Location { get; set; }
Geopoint Location(); void Location(Geopoint location);
public Geopoint Location { get; set; }
Public ReadWrite Property Location As Geopoint
Value
Geopoint Geopoint

The geographic location of the MapElement3D on the MapControl.

LocationProperty LocationProperty LocationProperty LocationProperty

Identifies the LocationProperty dependency property.

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

The LocationProperty dependency property.

MapStyleSheetEntry 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 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 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 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 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 MapTabIndexProperty

Identifies the MapTabIndex dependency property.

(Inherited from MapElement)

Model Model Model Model

Gets or sets the 3D model that represents a 3D object.

public : MapModel3D Model { get; set; }
MapModel3D Model(); void Model(MapModel3D model);
public MapModel3D Model { get; set; }
Public ReadWrite Property Model As MapModel3D
Value
MapModel3D MapModel3D

the 3D model that represents a 3D object.

Pitch Pitch Pitch Pitch

Gets or sets a value that indicates by how many degrees you want the 3D map element to be tilted. A value of 0 is looking out at the horizon and a value of -90 is looking straight down. A value of 90 is looking straight up. The default value is 0.

public : double Pitch { get; set; }
double Pitch(); void Pitch(double pitch);
public double Pitch { get; set; }
Public ReadWrite Property Pitch As double
Value
double double

A value that indicates by how many degrees you want the 3D map element to be tilted.

PitchProperty PitchProperty PitchProperty PitchProperty

Identifies the Pitch dependency property.

public : static DependencyProperty PitchProperty { get; }
static DependencyProperty PitchProperty();
public static DependencyProperty PitchProperty { get; }
Public Static ReadOnly Property PitchProperty As DependencyProperty
Value
DependencyProperty DependencyProperty

The Pitch dependency property.

Roll Roll Roll Roll

Gets or sets the roll of the 3D map element in degrees, where -90 is tilting to the left and +90 is tilting to the right.

public : double Roll { get; set; }
double Roll(); void Roll(double roll);
public double Roll { get; set; }
Public ReadWrite Property Roll As double
Value
double double

The roll of the 3D map element in degrees, where -90 is tilting to the left and +90 is tilting to the right.

RollProperty RollProperty RollProperty RollProperty

Identifies the Pitch dependency property.

public : static DependencyProperty RollProperty { get; }
static DependencyProperty RollProperty();
public static DependencyProperty RollProperty { get; }
Public Static ReadOnly Property RollProperty As DependencyProperty
Value
DependencyProperty DependencyProperty

The Pitch dependency property.

Scale Scale Scale Scale

The scale to apply to the 3D map element.

public : Vector3 Scale { get; set; }
Vector3 Scale(); void Scale(Vector3 scale);
public Vector3 Scale { get; set; }
Public ReadWrite Property Scale As Vector3
Value
Vector3 Vector3

The scale to apply to the 3D map element. A value of Vector3 (1.0,1.0,1.0) is equivalent to 100%.

ScaleProperty ScaleProperty ScaleProperty ScaleProperty

Identifies the Roll dependency property.

public : static DependencyProperty ScaleProperty { get; }
static DependencyProperty ScaleProperty();
public static DependencyProperty ScaleProperty { get; }
Public Static ReadOnly Property ScaleProperty As DependencyProperty
Value
DependencyProperty DependencyProperty

The Roll dependency property.

Tag 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 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 Visible

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

(Inherited from MapElement)

VisibleProperty VisibleProperty VisibleProperty VisibleProperty

Identifies the Visible dependency property.

(Inherited from MapElement)

ZIndex 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 ZIndexProperty

Identifies the ZIndex dependency property.

(Inherited from MapElement)

Methods

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

Clears the local value of a dependency property.

(Inherited from DependencyObject)

GetAnimationBaseValue(DependencyProperty) 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) GetValue(DependencyProperty)

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

(Inherited from DependencyObject)

ReadLocalValue(DependencyProperty) 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) 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) 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) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

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

(Inherited from DependencyObject)