MapSpan.FromLocations(IEnumerable<Location>) Method

Definition

Creates a MapSpan that encompasses all of the specified locations.

public:
 static Microsoft::Maui::Maps::MapSpan ^ FromLocations(System::Collections::Generic::IEnumerable<Microsoft::Maui::Devices::Sensors::Location ^> ^ locations);
public static Microsoft.Maui.Maps.MapSpan FromLocations(System.Collections.Generic.IEnumerable<Microsoft.Maui.Devices.Sensors.Location> locations);
static member FromLocations : seq<Microsoft.Maui.Devices.Sensors.Location> -> Microsoft.Maui.Maps.MapSpan
Public Shared Function FromLocations (locations As IEnumerable(Of Location)) As MapSpan

Parameters

locations
IEnumerable<Location>

The locations to include in the span.

Returns

A new MapSpan that fits all locations, with 10% padding.

Exceptions

Thrown when locations is null.

Thrown when locations is empty.

Applies to