Jaa


MapScene.CreateFromLocation Method

Definition

Overloads

CreateFromLocation(Geopoint)

Creates a scene to appear in a map based on a single geographic location.

CreateFromLocation(Geopoint, Double, Double)

Creates a scene to appear in a map based on a single geographic location, heading, and pitch.

CreateFromLocation(Geopoint)

Creates a scene to appear in a map based on a single geographic location.

public:
 static MapScene ^ CreateFromLocation(Geopoint ^ location);
/// [Windows.Foundation.Metadata.Overload("CreateFromLocation")]
 static MapScene CreateFromLocation(Geopoint const& location);
[Windows.Foundation.Metadata.Overload("CreateFromLocation")]
public static MapScene CreateFromLocation(Geopoint location);
function createFromLocation(location)
Public Shared Function CreateFromLocation (location As Geopoint) As MapScene

Parameters

location
Geopoint

The center of the scene.

Returns

Represents a view of a map in the MapControl.

Attributes

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

Applies to

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);
/// [Windows.Foundation.Metadata.Overload("CreateFromLocationWithHeadingAndPitch")]
 static MapScene CreateFromLocation(Geopoint const& location, double const& headingInDegrees, double const& pitchInDegrees);
[Windows.Foundation.Metadata.Overload("CreateFromLocationWithHeadingAndPitch")]
public static MapScene CreateFromLocation(Geopoint location, double headingInDegrees, double pitchInDegrees);
function createFromLocation(location, headingInDegrees, pitchInDegrees)
Public Shared Function CreateFromLocation (location As Geopoint, headingInDegrees As Double, pitchInDegrees As Double) As MapScene

Parameters

location
Geopoint

The center of 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 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 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