Share via


MapScene.CreateFromLocations Method

Definition

Overloads

CreateFromLocations(IIterable<Geopoint>)

Creates a scene to appear in a map based on multiple geographic locations.

CreateFromLocations(IIterable<Geopoint>, Double, Double)

Creates a scene to appear in a map based on multiple geographic locations, a heading, and pitch.

CreateFromLocations(IIterable<Geopoint>)

Creates a scene to appear in a map based on multiple geographic locations.

public:
 static MapScene ^ CreateFromLocations(IIterable<Geopoint ^> ^ locations);
/// [Windows.Foundation.Metadata.Overload("CreateFromLocations")]
 static MapScene CreateFromLocations(IIterable<Geopoint> const& locations);
[Windows.Foundation.Metadata.Overload("CreateFromLocations")]
public static MapScene CreateFromLocations(IEnumerable<Geopoint> locations);
function createFromLocations(locations)
Public Shared Function CreateFromLocations (locations As IEnumerable(Of Geopoint)) As MapScene

Parameters

locations

IIterable<Geopoint>

IEnumerable<Geopoint>

The locations to appear in the scene.

Returns

Represents a view of a map in the MapControl.

Attributes

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

Applies to

CreateFromLocations(IIterable<Geopoint>, 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);
/// [Windows.Foundation.Metadata.Overload("CreateFromLocationsWithHeadingAndPitch")]
 static MapScene CreateFromLocations(IIterable<Geopoint> const& locations, double const& headingInDegrees, double const& pitchInDegrees);
[Windows.Foundation.Metadata.Overload("CreateFromLocationsWithHeadingAndPitch")]
public static MapScene CreateFromLocations(IEnumerable<Geopoint> locations, double headingInDegrees, double pitchInDegrees);
function createFromLocations(locations, headingInDegrees, pitchInDegrees)
Public Shared Function CreateFromLocations (locations As IEnumerable(Of Geopoint), headingInDegrees As Double, pitchInDegrees As Double) As MapScene

Parameters

locations

IIterable<Geopoint>

IEnumerable<Geopoint>

The locations 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 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 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