Share via


MapScene.CreateFromBoundingBox Method

Definition

Overloads

CreateFromBoundingBox(GeoboundingBox)

Creates a scene to appear in a map based on a four-sided geographic area.

CreateFromBoundingBox(GeoboundingBox, Double, Double)

Creates a scene to appear in a map based on a four-sided geographic area, heading, and pitch.

CreateFromBoundingBox(GeoboundingBox)

Creates a scene to appear in a map based on a four-sided geographic area.

public:
 static MapScene ^ CreateFromBoundingBox(GeoboundingBox ^ bounds);
/// [Windows.Foundation.Metadata.Overload("CreateFromBoundingBox")]
 static MapScene CreateFromBoundingBox(GeoboundingBox const& bounds);
[Windows.Foundation.Metadata.Overload("CreateFromBoundingBox")]
public static MapScene CreateFromBoundingBox(GeoboundingBox bounds);
function createFromBoundingBox(bounds)
Public Shared Function CreateFromBoundingBox (bounds As GeoboundingBox) As MapScene

Parameters

bounds
GeoboundingBox

The four-sided geographic area to appear in the scene.

Returns

Represents a view of a map in the MapControl.

Attributes

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

Applies to

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);
/// [Windows.Foundation.Metadata.Overload("CreateFromBoundingBoxWithHeadingAndPitch")]
 static MapScene CreateFromBoundingBox(GeoboundingBox const& bounds, double const& headingInDegrees, double const& pitchInDegrees);
[Windows.Foundation.Metadata.Overload("CreateFromBoundingBoxWithHeadingAndPitch")]
public static MapScene CreateFromBoundingBox(GeoboundingBox bounds, double headingInDegrees, double pitchInDegrees);
function createFromBoundingBox(bounds, headingInDegrees, pitchInDegrees)
Public Shared Function CreateFromBoundingBox (bounds As GeoboundingBox, headingInDegrees As Double, pitchInDegrees As Double) As MapScene

Parameters

bounds
GeoboundingBox

The four-sided geographic area to appear in the scene.

headingInDegrees
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

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.

Returns

Represents a view of a map in the MapControl.

Attributes

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 relationship between MapCamera location and MapScene location relative to the map. 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.

Property2D range3D rangeStreetside range
pitch/tilt0-750-900-180

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

See also

Applies to