MapScene
MapScene
MapScene
MapScene
Class
Definition
Represents a view of a map.
public : sealed class MapScene : DependencyObject, IMapScenepublic sealed class MapScene : DependencyObject, IMapScenePublic NotInheritable Class MapScene Inherits DependencyObject Implements IMapScene// This API is not available in Javascript.
- Inheritance
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
Inherited properties
Properties
TargetCamera TargetCamera TargetCamera TargetCamera
Gets the MapCamera settings that define the final position of the camera.
public : MapCamera TargetCamera { get; }public MapCamera TargetCamera { get; }Public ReadOnly Property TargetCamera As MapCamera// This API is not available in Javascript.
The MapCamera settings that define the final position of the camera.
Remarks
During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.
Methods
CreateFromBoundingBox(GeoboundingBox) CreateFromBoundingBox(GeoboundingBox) CreateFromBoundingBox(GeoboundingBox) CreateFromBoundingBox(GeoboundingBox)
Creates a scene to appear in a map based on a four-sided geographic area.
public : static MapScene CreateFromBoundingBox(GeoboundingBox bounds)public static MapScene CreateFromBoundingBox(GeoboundingBox bounds)Public Static Function CreateFromBoundingBox(bounds As GeoboundingBox) As MapScene// This API is not available in Javascript.
The four-sided geographic area to appear in the scene.
Represents a view of a map in the MapControl.
Remarks
This constructor is equivalent to calling CreateFromBoundingBox(GeoboundingBox, Double, Double) with the following default parameter values: headingInDegrees = 0 (North) and pitchInDegrees = 0 (looking straight down). For more information, see the remarks section of the CreateFromBoundingBox(GeoboundingBox, Double, Double) method.
- See Also
CreateFromBoundingBox(GeoboundingBox, Double, Double) CreateFromBoundingBox(GeoboundingBox, Double, Double) CreateFromBoundingBox(GeoboundingBox, Double, Double) CreateFromBoundingBox(GeoboundingBox, Double, Double)
Creates a scene to appear in a map based on a four-sided geographic area, heading, and pitch.
public : static MapScene CreateFromBoundingBox(GeoboundingBox bounds, double headingInDegrees, double pitchInDegrees)public static MapScene CreateFromBoundingBox(GeoboundingBox bounds, Double headingInDegrees, Double pitchInDegrees)Public Static Function CreateFromBoundingBox(bounds As GeoboundingBox, headingInDegrees As Double, pitchInDegrees As Double) As MapScene// This API is not available in Javascript.
The four-sided geographic area to appear in the scene.
- headingInDegrees
- double Double Double Double
The directional heading of the map's camera in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West. The default headingInDegrees value is 0.
- pitchInDegrees
- double Double Double Double
The pitch of the map's camera in degrees, where 90 is looking out at the horizon (maximum) and 0 is looking straight down (minimum). The default pitchInDegrees value is 0.
Represents a view of a map in the MapControl.
Remarks
Tip
Use the CreateFromCamera method to create a scene by specifying the position of the map's camera. The location specified in this method by the bounds parameter is the location that will appear in the scene, it's not the location of the map's camera.
The following image demonstrates the location of the scene relative to the map's camera. The location specified in this method by the bounds parameter corresponds to the MapScene location.
The valid range of pitch differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current pitch value will be truncated to the nearest acceptable value in the next view.
When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.
The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.
| Property | 2D range | 3D range | Streetside range |
|---|---|---|---|
| pitch/tilt | 0-75 | 0-90 | 0-180 |
Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.
- See Also
CreateFromCamera(MapCamera) CreateFromCamera(MapCamera) CreateFromCamera(MapCamera) CreateFromCamera(MapCamera)
Creates a scene to appear in a map based on the position of the specified MapCamera.
public : static MapScene CreateFromCamera(MapCamera camera)public static MapScene CreateFromCamera(MapCamera camera)Public Static Function CreateFromCamera(camera As MapCamera) As MapScene// This API is not available in Javascript.
Represents a view of a map in the MapControl.
Remarks
The following image demonstrates the location of the map's camera relative to the scene.

CreateFromLocation(Geopoint) CreateFromLocation(Geopoint) CreateFromLocation(Geopoint) CreateFromLocation(Geopoint)
Creates a scene to appear in a map based on a single geographic location.
public : static MapScene CreateFromLocation(Geopoint location)public static MapScene CreateFromLocation(Geopoint location)Public Static Function CreateFromLocation(location As Geopoint) As MapScene// This API is not available in Javascript.
Represents a view of a map in the MapControl.
Remarks
This constructor is equivalent to calling CreateFromLocation(Geopoint, Double, Double) with the following default parameter values: headingInDegrees = 0 (North) and pitchInDegrees = 0 (looking straight down).
For more information, see the remarks section of the CreateFromLocation(Geopoint, Double, Double) method.
- See Also
CreateFromLocation(Geopoint, Double, Double) CreateFromLocation(Geopoint, Double, Double) CreateFromLocation(Geopoint, Double, Double) CreateFromLocation(Geopoint, Double, Double)
Creates a scene to appear in a map based on a single geographic location, heading, and pitch.
public : static MapScene CreateFromLocation(Geopoint location, double headingInDegrees, double pitchInDegrees)public static MapScene CreateFromLocation(Geopoint location, Double headingInDegrees, Double pitchInDegrees)Public Static Function CreateFromLocation(location As Geopoint, headingInDegrees As Double, pitchInDegrees As Double) As MapScene// This API is not available in Javascript.
- headingInDegrees
- double Double Double Double
The directional heading of the map's camera in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West. The default headingInDegrees value is 0.
- pitchInDegrees
- double Double Double Double
The pitch of the map's camera in degrees, where 90 is looking out at the horizon (maximum) and 0 is looking straight down (minimum). The default pitchInDegrees value is 0.
Represents a view of a map in the MapControl.
Remarks
Tip
Use the CreateFromCamera method to create a scene by specifying the position of the map's camera. The location specified in this method by the location parameter is the location that will appear in the scene, it's not the location of the map's camera.
The following image demonstrates the location of the scene relative to the map's camera. The location specified in this method by the location parameter corresponds to the MapScene location.
The valid range of pitch differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current pitch value will be truncated to the nearest acceptable value in the next view.
When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.
The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.
| Property | 2D range | 3D range | Streetside range |
|---|---|---|---|
| pitch/tilt | 0-75 | 0-90 | 0-180 |
Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.
- See Also
CreateFromLocationAndRadius(Geopoint, Double) CreateFromLocationAndRadius(Geopoint, Double) CreateFromLocationAndRadius(Geopoint, Double) CreateFromLocationAndRadius(Geopoint, Double)
Creates a scene to appear in a map based on a single geographic location and radius.
public : static MapScene CreateFromLocationAndRadius(Geopoint location, double radiusInMeters)public static MapScene CreateFromLocationAndRadius(Geopoint location, Double radiusInMeters)Public Static Function CreateFromLocationAndRadius(location As Geopoint, radiusInMeters As Double) As MapScene// This API is not available in Javascript.
- radiusInMeters
- double Double Double Double
The radius around the center to appear in the scene, in meters.
Represents a view of a map in the MapControl.
Remarks
This constructor is equivalent to calling CreateFromLocationAndRadius(Geopoint, Double, Double, Double) with the following default parameter values: headingInDegrees = 0 (North) and pitchInDegrees = 0 (looking straight down). For more information, see the remarks section of the CreateFromLocationAndRadius(Geopoint, Double, Double, Double) method.
- See Also
CreateFromLocationAndRadius(Geopoint, Double, Double, Double) CreateFromLocationAndRadius(Geopoint, Double, Double, Double) CreateFromLocationAndRadius(Geopoint, Double, Double, Double) CreateFromLocationAndRadius(Geopoint, Double, Double, Double)
Creates a scene to appear in a map based on a single geographic location, radius, heading, and pitch.
public : static MapScene CreateFromLocationAndRadius(Geopoint location, double radiusInMeters, double headingInDegrees, double pitchInDegrees)public static MapScene CreateFromLocationAndRadius(Geopoint location, Double radiusInMeters, Double headingInDegrees, Double pitchInDegrees)Public Static Function CreateFromLocationAndRadius(location As Geopoint, radiusInMeters As Double, headingInDegrees As Double, pitchInDegrees As Double) As MapScene// This API is not available in Javascript.
- radiusInMeters
- double Double Double Double
The radius around the center to appear in the scene, in meters.
- headingInDegrees
- double Double Double Double
The directional heading of the map's camera in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West. The default headingInDegrees value is 0.
- pitchInDegrees
- double Double Double Double
The pitch of the map's camera in degrees, where 90 is looking out at the horizon (maximum) and 0 is looking straight down (minimum). The default pitchInDegrees value is 0.
Represents a view of a map in the MapControl.
Remarks
Tip
Use the CreateFromCamera method to create a scene by specifying the position of the map's camera. The location specified in this method by the location parameter is the location that will appear in the scene, it's not the location of the map's camera.
The following image demonstrates the location of the scene relative to the map's camera. The location specified in this method by the location parameter corresponds to the MapScene location.
The valid range of pitch differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current pitch value will be truncated to the nearest acceptable value in the next view.
When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.
The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.
| Property | 2D range | 3D range | Streetside range |
|---|---|---|---|
| pitch/tilt | 0-75 | 0-90 | 0-180 |
Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.
- See Also
CreateFromLocations(IIterable)
CreateFromLocations(IIterable)
CreateFromLocations(IIterable)
CreateFromLocations(IIterable)
Creates a scene to appear in a map based on multiple geographic locations.
public : static MapScene CreateFromLocations(IIterable<Geopoint> locations)public static MapScene CreateFromLocations(IEnumerable<Geopoint> locations)Public Static Function CreateFromLocations(locations As IEnumerable<Geopoint>) As MapScene// This API is not available in Javascript.
- locations
- IIterable<Geopoint> IEnumerable<Geopoint> IEnumerable<Geopoint> IEnumerable<Geopoint>
The locations to appear in the scene.
Represents a view of a map in the MapControl.
Remarks
This constructor is equivalent to calling CreateFromLocations(IIterable(Geopoint), Double, Double) with the following default parameter values: headingInDegrees = 0 (North) and pitchInDegrees = 0 (looking straight down). For more information, see the CreateFromLocations(IIterable(Geopoint), Double, Double) method.
- See Also
CreateFromLocations(IIterable, Double, Double)
CreateFromLocations(IIterable, Double, Double)
CreateFromLocations(IIterable, Double, Double)
CreateFromLocations(IIterable, Double, Double)
Creates a scene to appear in a map based on multiple geographic locations, a heading, and pitch.
public : static MapScene CreateFromLocations(IIterable<Geopoint> locations, double headingInDegrees, double pitchInDegrees)public static MapScene CreateFromLocations(IEnumerable<Geopoint> locations, Double headingInDegrees, Double pitchInDegrees)Public Static Function CreateFromLocations(locations As IEnumerable<Geopoint>, headingInDegrees As Double, pitchInDegrees As Double) As MapScene// This API is not available in Javascript.
- locations
- IIterable<Geopoint> IEnumerable<Geopoint> IEnumerable<Geopoint> IEnumerable<Geopoint>
The locations to appear in the scene.
- headingInDegrees
- double Double Double Double
The directional heading of the map's camera in degrees, where 0 or 360 = North, 90 = East, 180 = South, and 270 = West. The default headingInDegrees value is 0.
- pitchInDegrees
- double Double Double Double
The pitch of the map's camera in degrees, where 90 is looking out at the horizon (maximum) and 0 is looking straight down (minimum). The default pitchInDegrees value is 0.
Represents a view of a map in the MapControl.
Remarks
Tip
Use the CreateFromCamera method to create a scene by specifying the position of the map's camera. The locations specified in this method by the locations parameter are the locations that will appear in the scene, they're not the location of the map's camera.
The following image demonstrates the location of the scene relative to the map's camera. The locations specified in this method by the locations parameter corresponds to the MapScene location.
The valid range of pitch differs between 2D, 3D, and Streetside map views. When switching from 3D to 2D for example, values that are acceptable in the current view may be out of range in the next view. If that’s the case, the current pitch value will be truncated to the nearest acceptable value in the next view.
When leaving a Streetside view, the map returns to the previous view settings. The Streetside pitch is not maintained outside of the Streetside experience.
The maximum and minimum values of pitch/tilt depend on the type of map view: 2D, 3D, or Streetside.
| Property | 2D range | 3D range | Streetside range |
|---|---|---|---|
| pitch/tilt | 0-75 | 0-90 | 0-180 |
Heading values greater than 360 degrees are normalized to their equivalent 0-360 degree value.
- See Also
Events
TargetCameraChanged TargetCameraChanged TargetCameraChanged TargetCameraChanged
Occurs when the final position of the map's camera has changed.
public : event TypedEventHandler TargetCameraChanged<MapScene, MapTargetCameraChangedEventArgs>public event TypedEventHandler TargetCameraChanged<MapScene, MapTargetCameraChangedEventArgs>Public Event TargetCameraChanged<MapScene, MapTargetCameraChangedEventArgs>// This API is not available in Javascript.
Remarks
During an animation of the map, the ActualCamera defines the current position of the map's camera and TargetCamera defines the final position of the camera.