MapElement3D
MapElement3D
MapElement3D
MapElement3D
Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
Represents a 3D element displayed on a MapControl.
public : sealed class MapElement3D : MapElement, IMapElement3Dpublic sealed class MapElement3D : MapElement, IMapElement3DPublic NotInheritable Class MapElement3D Inherits MapElement Implements IMapElement3D// This API is not available in Javascript.
- Inheritance
-
MapElement3DMapElement3DMapElement3DMapElement3D
- Attributes
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Inherited Members
Inherited methods
Inherited properties
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()
Prerelease. Creates a MapElement3D instance.
public : MapElement3D()public MapElement3D()Public Sub New()// This API is not available in Javascript.
Properties
Heading Heading Heading Heading
Prerelease. 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; }public double Heading { get; set; }Public ReadWrite Property Heading As double// This API is not available in Javascript.
- Value
- double double 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
Prerelease. Identifies the Heading dependency property.
public : static DependencyProperty HeadingProperty { get; }public static DependencyProperty HeadingProperty { get; }Public Static ReadOnly Property HeadingProperty As DependencyProperty// This API is not available in Javascript.
The Heading dependency property.
Location Location Location Location
Prerelease. Gets or sets the geographic location of the MapElement3D on the MapControl. .
public : Geopoint Location { get; set; }public Geopoint Location { get; set; }Public ReadWrite Property Location As Geopoint// This API is not available in Javascript.
The geographic location of the MapElement3D on the MapControl.
LocationProperty LocationProperty LocationProperty LocationProperty
Prerelease. Identifies the LocationProperty dependency property.
public : static DependencyProperty LocationProperty { get; }public static DependencyProperty LocationProperty { get; }Public Static ReadOnly Property LocationProperty As DependencyProperty// This API is not available in Javascript.
The LocationProperty dependency property.
Model Model Model Model
Prerelease. Gets or sets the 3D model that represents a 3D object.
public : MapModel3D Model { get; set; }public MapModel3D Model { get; set; }Public ReadWrite Property Model As MapModel3D// This API is not available in Javascript.
the 3D model that represents a 3D object.
Pitch Pitch Pitch Pitch
Prerelease. 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; }public double Pitch { get; set; }Public ReadWrite Property Pitch As double// This API is not available in Javascript.
- Value
- double double double double
A value that indicates by how many degrees you want the 3D map element to be tilted.
PitchProperty PitchProperty PitchProperty PitchProperty
Prerelease. Identifies the Pitch dependency property.
public : static DependencyProperty PitchProperty { get; }public static DependencyProperty PitchProperty { get; }Public Static ReadOnly Property PitchProperty As DependencyProperty// This API is not available in Javascript.
The Pitch dependency property.
Roll Roll Roll Roll
Prerelease. 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; }public double Roll { get; set; }Public ReadWrite Property Roll As double// This API is not available in Javascript.
- Value
- double double 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
Prerelease. Identifies the Pitch dependency property.
public : static DependencyProperty RollProperty { get; }public static DependencyProperty RollProperty { get; }Public Static ReadOnly Property RollProperty As DependencyProperty// This API is not available in Javascript.
The Pitch dependency property.
Scale Scale Scale Scale
Prerelease. The scale to apply to the 3D map element.
public : Vector3 Scale { get; set; }public Vector3 Scale { get; set; }Public ReadWrite Property Scale As Vector3// This API is not available in Javascript.
- Value
- Vector3 Vector3 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
Prerelease. Identifies the Roll dependency property.
public : static DependencyProperty ScaleProperty { get; }public static DependencyProperty ScaleProperty { get; }Public Static ReadOnly Property ScaleProperty As DependencyProperty// This API is not available in Javascript.
The Roll dependency property.