Merge branch 'master' into feature/issue-348
This commit is contained in:
Коммит
d39b08cc23
|
@ -36,6 +36,8 @@
|
|||
<Entry Text="{Binding AdminArea}"/>
|
||||
<Label Text="Country Name"/>
|
||||
<Entry Text="{Binding Country}"/>
|
||||
<Label Text="Zip Code"/>
|
||||
<Entry Text="{Binding ZipCode}" Keyboard="Numeric"/>
|
||||
|
||||
<Button Text="Open address" Command="{Binding LaunchPlacemarkCommand}"/>
|
||||
</StackLayout>
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace Samples.ViewModel
|
|||
{
|
||||
public class GeolocationViewModel : BaseViewModel
|
||||
{
|
||||
string notAvailable = "not available";
|
||||
string lastLocation;
|
||||
string currentLocation;
|
||||
int accuracy = (int)GeolocationAccuracy.Medium;
|
||||
|
@ -98,7 +99,9 @@ namespace Samples.ViewModel
|
|||
$"Latitude: {location.Latitude}\n" +
|
||||
$"Longitude: {location.Longitude}\n" +
|
||||
$"Accuracy: {location.Accuracy}\n" +
|
||||
$"Altitude: {location.Altitude}\n" +
|
||||
$"Altitude: {(location.Altitude.HasValue ? location.Altitude.Value.ToString() : notAvailable)}\n" +
|
||||
$"Heading: {(location.Course.HasValue ? location.Course.Value.ToString() : notAvailable)}\n" +
|
||||
$"Speed: {(location.Speed.HasValue ? location.Speed.Value.ToString() : notAvailable)}\n" +
|
||||
$"Date (UTC): {location.TimestampUtc:d}\n" +
|
||||
$"Time (UTC): {location.TimestampUtc:T}";
|
||||
}
|
||||
|
|
|
@ -63,9 +63,19 @@ namespace Samples.ViewModel
|
|||
set => SetProperty(ref country, value);
|
||||
}
|
||||
|
||||
string zipCode = "98052";
|
||||
|
||||
public string ZipCode
|
||||
{
|
||||
get => zipCode;
|
||||
set => SetProperty(ref zipCode, value);
|
||||
}
|
||||
|
||||
public List<string> DirectionModes { get; } =
|
||||
new List<string>
|
||||
{
|
||||
"None",
|
||||
"Bicycling",
|
||||
"Default",
|
||||
"Driving",
|
||||
"Transit",
|
||||
|
@ -102,7 +112,8 @@ namespace Samples.ViewModel
|
|||
Locality = Locality,
|
||||
AdminArea = AdminArea,
|
||||
CountryName = Country,
|
||||
Thoroughfare = Thoroughfare
|
||||
Thoroughfare = Thoroughfare,
|
||||
PostalCode = ZipCode
|
||||
};
|
||||
await Maps.OpenAsync(placemark, new MapsLaunchOptions() { Name = Name, MapDirectionsMode = (MapDirectionsMode)DirectionMode });
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ namespace Tests
|
|||
|
||||
[Theory]
|
||||
[InlineData("https://xamarin.com", "https://xamarin.com")]
|
||||
[InlineData("https://xamarin.com/test.html", "https://xamarin.com/test.html")]
|
||||
[InlineData("https://xamarin.com:56/test.html", "https://xamarin.com:56/test.html")]
|
||||
[InlineData("http://xamarin.com", "http://xamarin.com")]
|
||||
[InlineData("https://xamariñ.com", "https://xn--xamari-1wa.com")]
|
||||
[InlineData("http://xamariñ.com", "http://xn--xamari-1wa.com")]
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Xamarin.Essentials
|
|||
return uri;
|
||||
#else
|
||||
var idn = new System.Globalization.IdnMapping();
|
||||
return new Uri(uri.Scheme + "://" + idn.GetAscii(uri.DnsSafeHost) + uri.PathAndQuery);
|
||||
return new Uri(uri.Scheme + "://" + idn.GetAscii(uri.Authority) + uri.PathAndQuery);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
{
|
||||
public enum MapDirectionsMode
|
||||
{
|
||||
None,
|
||||
Bicycling,
|
||||
Default,
|
||||
Driving,
|
||||
Transit,
|
||||
Walking
|
||||
Walking,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public class MapsLaunchOptions
|
||||
{
|
||||
public MapDirectionsMode MapDirectionsMode { get; set; } = MapDirectionsMode.Default;
|
||||
public MapDirectionsMode MapDirectionsMode { get; set; } = MapDirectionsMode.None;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
|
|
|
@ -10,19 +10,51 @@ namespace Xamarin.Essentials
|
|||
internal static Task PlatformOpenMapsAsync(double latitude, double longitude, MapsLaunchOptions options)
|
||||
{
|
||||
var uri = string.Empty;
|
||||
uri = $"geo:{latitude.ToString(CultureInfo.InvariantCulture)},{longitude.ToString(CultureInfo.InvariantCulture)}?q={latitude.ToString(CultureInfo.InvariantCulture)},{longitude.ToString(CultureInfo.InvariantCulture)}";
|
||||
if (!string.IsNullOrWhiteSpace(options.Name))
|
||||
uri += $"({options.Name})";
|
||||
var lat = latitude.ToString(CultureInfo.InvariantCulture);
|
||||
var lng = longitude.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
if (options.MapDirectionsMode == MapDirectionsMode.None)
|
||||
{
|
||||
uri = $"geo:{lat},{lng}?q={lat},{lng}";
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(options.Name))
|
||||
uri += $"({AndroidUri.Encode(options.Name)})";
|
||||
}
|
||||
else
|
||||
{
|
||||
uri = $"google.navigation:q={lat},{lng}{GetMode(options.MapDirectionsMode)}";
|
||||
}
|
||||
|
||||
StartIntent(uri);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
internal static string GetMode(MapDirectionsMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MapDirectionsMode.Bicycling: return "&mode=b";
|
||||
case MapDirectionsMode.Driving: return "&mode=d";
|
||||
case MapDirectionsMode.Walking: return "&mode=w";
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
internal static Task PlatformOpenMapsAsync(Placemark placemark, MapsLaunchOptions options)
|
||||
{
|
||||
placemark = placemark.Escape();
|
||||
var uri = $"geo:0,0?q={placemark.Thoroughfare} {placemark.Locality} {placemark.AdminArea} {placemark.CountryName}";
|
||||
if (!string.IsNullOrWhiteSpace(options.Name))
|
||||
uri += $"({options.Name})";
|
||||
var uri = string.Empty;
|
||||
if (options.MapDirectionsMode == MapDirectionsMode.None)
|
||||
{
|
||||
uri = $"geo:0,0?q={placemark.Thoroughfare} {placemark.Locality} {placemark.AdminArea} {placemark.PostalCode} {placemark.CountryName}";
|
||||
if (!string.IsNullOrWhiteSpace(options.Name))
|
||||
uri += $"({AndroidUri.Encode(options.Name)})";
|
||||
}
|
||||
else
|
||||
{
|
||||
uri = $"google.navigation:q={placemark.Thoroughfare} {placemark.Locality} {placemark.AdminArea} {placemark.PostalCode} {placemark.CountryName}{GetMode(options.MapDirectionsMode)}";
|
||||
}
|
||||
|
||||
StartIntent(uri);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ namespace Xamarin.Essentials
|
|||
Country = placemark.CountryName,
|
||||
State = placemark.AdminArea,
|
||||
Street = placemark.Thoroughfare,
|
||||
City = placemark.Locality
|
||||
City = placemark.Locality,
|
||||
Zip = placemark.PostalCode
|
||||
};
|
||||
|
||||
var coder = new CLGeocoder();
|
||||
|
@ -57,26 +58,32 @@ namespace Xamarin.Essentials
|
|||
Name = options.Name ?? string.Empty
|
||||
};
|
||||
|
||||
var mode = MKDirectionsMode.Default;
|
||||
|
||||
switch (options.MapDirectionsMode)
|
||||
MKLaunchOptions launchOptions = null;
|
||||
if (options.MapDirectionsMode != MapDirectionsMode.None)
|
||||
{
|
||||
case MapDirectionsMode.Driving:
|
||||
mode = MKDirectionsMode.Driving;
|
||||
break;
|
||||
case MapDirectionsMode.Transit:
|
||||
mode = MKDirectionsMode.Transit;
|
||||
break;
|
||||
case MapDirectionsMode.Walking:
|
||||
mode = MKDirectionsMode.Walking;
|
||||
break;
|
||||
var mode = MKDirectionsMode.Default;
|
||||
|
||||
switch (options.MapDirectionsMode)
|
||||
{
|
||||
case MapDirectionsMode.Driving:
|
||||
mode = MKDirectionsMode.Driving;
|
||||
break;
|
||||
case MapDirectionsMode.Transit:
|
||||
mode = MKDirectionsMode.Transit;
|
||||
break;
|
||||
case MapDirectionsMode.Walking:
|
||||
mode = MKDirectionsMode.Walking;
|
||||
break;
|
||||
case MapDirectionsMode.Default:
|
||||
mode = MKDirectionsMode.Default;
|
||||
break;
|
||||
}
|
||||
launchOptions = new MKLaunchOptions
|
||||
{
|
||||
DirectionsMode = mode
|
||||
};
|
||||
}
|
||||
|
||||
var launchOptions = new MKLaunchOptions
|
||||
{
|
||||
DirectionsMode = mode
|
||||
};
|
||||
|
||||
var mapItems = new[] { mapItem };
|
||||
MKMapItem.OpenMaps(mapItems, launchOptions);
|
||||
return Task.CompletedTask;
|
||||
|
|
|
@ -8,27 +8,60 @@ namespace Xamarin.Essentials
|
|||
{
|
||||
internal static Task PlatformOpenMapsAsync(double latitude, double longitude, MapsLaunchOptions options)
|
||||
{
|
||||
return LaunchUri(new Uri(
|
||||
$"bingmaps:?collection=point." +
|
||||
$"{latitude.ToString(CultureInfo.InvariantCulture)}" +
|
||||
$"_" +
|
||||
$"{longitude.ToString(CultureInfo.InvariantCulture)}" +
|
||||
$"_" +
|
||||
$"{options.Name ?? string.Empty}"));
|
||||
var lat = latitude.ToString(CultureInfo.InvariantCulture);
|
||||
var lng = longitude.ToString(CultureInfo.InvariantCulture);
|
||||
var name = options.Name ?? string.Empty;
|
||||
var uri = string.Empty;
|
||||
|
||||
if (options.MapDirectionsMode == MapDirectionsMode.None)
|
||||
{
|
||||
uri = $"bingmaps:?collection=point.{lat}_{lng}_{name}";
|
||||
}
|
||||
else
|
||||
{
|
||||
uri = $"bingmaps:?rtp=~pos.{lat}_{lng}_{name}{GetMode(options.MapDirectionsMode)}";
|
||||
}
|
||||
|
||||
return LaunchUri(new Uri(uri));
|
||||
}
|
||||
|
||||
internal static string GetMode(MapDirectionsMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case MapDirectionsMode.Driving: return "&mode=d";
|
||||
case MapDirectionsMode.Transit: return "&mode=t";
|
||||
case MapDirectionsMode.Walking: return "&mode=w";
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
internal static Task PlatformOpenMapsAsync(Placemark placemark, MapsLaunchOptions options)
|
||||
{
|
||||
placemark = placemark.Escape();
|
||||
var uri = string.Empty;
|
||||
|
||||
var uri = new Uri(
|
||||
$"bingmaps:?where=" +
|
||||
$"{placemark.Thoroughfare}" +
|
||||
$"%20{placemark.Locality}" +
|
||||
$"%20{placemark.AdminArea}" +
|
||||
$"%20{placemark.CountryName}");
|
||||
if (options.MapDirectionsMode == MapDirectionsMode.None)
|
||||
{
|
||||
uri = $"bingmaps:?where=" +
|
||||
$"{placemark.Thoroughfare}" +
|
||||
$"%20{placemark.Locality}" +
|
||||
$"%20{placemark.AdminArea}" +
|
||||
$"%20{placemark.PostalCode}" +
|
||||
$"%20{placemark.CountryName}";
|
||||
}
|
||||
else
|
||||
{
|
||||
uri = $"bingmaps:?rtp=~adr." +
|
||||
$"{placemark.Thoroughfare}" +
|
||||
$"%20{placemark.Locality}" +
|
||||
$"%20{placemark.AdminArea}" +
|
||||
$"%20{placemark.PostalCode}" +
|
||||
$"%20{placemark.CountryName}" +
|
||||
$"{GetMode(options.MapDirectionsMode)}";
|
||||
}
|
||||
|
||||
return LaunchUri(uri);
|
||||
return LaunchUri(new Uri(uri));
|
||||
}
|
||||
|
||||
static Task LaunchUri(Uri mapsUri) =>
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace Xamarin.Essentials
|
|||
Latitude = point.Latitude;
|
||||
Longitude = point.Longitude;
|
||||
TimestampUtc = DateTimeOffset.UtcNow;
|
||||
Speed = point.Speed;
|
||||
Course = point.Course;
|
||||
}
|
||||
|
||||
public DateTimeOffset TimestampUtc { get; set; }
|
||||
|
@ -50,6 +52,10 @@ namespace Xamarin.Essentials
|
|||
|
||||
public double? Accuracy { get; set; }
|
||||
|
||||
public double? Speed { get; set; }
|
||||
|
||||
public double? Course { get; set; }
|
||||
|
||||
public static double CalculateDistance(double latitudeStart, double longitudeStart, Location locationEnd, DistanceUnits units) =>
|
||||
CalculateDistance(latitudeStart, locationEnd.Latitude, longitudeStart, locationEnd.Longitude, units);
|
||||
|
||||
|
|
|
@ -25,9 +25,11 @@ namespace Xamarin.Essentials
|
|||
{
|
||||
Latitude = location.Latitude,
|
||||
Longitude = location.Longitude,
|
||||
Altitude = location.HasAltitude ? location.Altitude : (double?)null,
|
||||
Altitude = location.HasAltitude ? location.Altitude : default(double?),
|
||||
TimestampUtc = location.GetTimestamp().ToUniversalTime(),
|
||||
Accuracy = location.HasAccuracy ? location.Accuracy : (float?)null
|
||||
Accuracy = location.HasAccuracy ? location.Accuracy : default(float?),
|
||||
Course = location.HasBearing ? location.Bearing : default(double?),
|
||||
Speed = location.HasSpeed ? location.Speed : default(double?)
|
||||
};
|
||||
|
||||
static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
|
|
@ -25,9 +25,11 @@ namespace Xamarin.Essentials
|
|||
{
|
||||
Latitude = location.Coordinate.Latitude,
|
||||
Longitude = location.Coordinate.Longitude,
|
||||
Altitude = location.VerticalAccuracy < 0 ? (double?)null : location.Altitude,
|
||||
Altitude = location.VerticalAccuracy < 0 ? default(double?) : location.Altitude,
|
||||
Accuracy = location.HorizontalAccuracy,
|
||||
TimestampUtc = location.Timestamp.ToDateTime()
|
||||
TimestampUtc = location.Timestamp.ToDateTime(),
|
||||
Course = location.Course < 0 ? default(double?) : location.Course,
|
||||
Speed = location.Speed < 0 ? default(double?) : location.Speed
|
||||
};
|
||||
|
||||
internal static DateTimeOffset ToDateTime(this NSDate timestamp)
|
||||
|
|
|
@ -30,7 +30,9 @@ namespace Xamarin.Essentials
|
|||
Longitude = location.Coordinate.Point.Position.Longitude,
|
||||
TimestampUtc = location.Coordinate.Timestamp,
|
||||
Altitude = location.Coordinate.Point.Position.Altitude,
|
||||
Accuracy = location.Coordinate.Accuracy
|
||||
Accuracy = location.Coordinate.Accuracy,
|
||||
Speed = (!location.Coordinate.Speed.HasValue || double.IsNaN(location.Coordinate.Speed.Value)) ? default : location.Coordinate.Speed,
|
||||
Course = (!location.Coordinate.Heading.HasValue || double.IsNaN(location.Coordinate.Heading.Value)) ? default : location.Coordinate.Heading
|
||||
};
|
||||
|
||||
internal static Location ToLocation(this Geocoordinate coordinate) =>
|
||||
|
@ -40,7 +42,9 @@ namespace Xamarin.Essentials
|
|||
Longitude = coordinate.Point.Position.Longitude,
|
||||
TimestampUtc = coordinate.Timestamp,
|
||||
Altitude = coordinate.Point.Position.Altitude,
|
||||
Accuracy = coordinate.Accuracy
|
||||
Accuracy = coordinate.Accuracy,
|
||||
Speed = (!coordinate.Speed.HasValue || double.IsNaN(coordinate.Speed.Value)) ? default : coordinate.Speed,
|
||||
Course = (!coordinate.Heading.HasValue || double.IsNaN(coordinate.Heading.Value)) ? default : coordinate.Heading
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
<Reference Include="System.Numerics.Vectors" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid81')) ">
|
||||
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="27.0.2" />
|
||||
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="27.0.2" />
|
||||
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="27.0.2.1" />
|
||||
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="27.0.2.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid80')) ">
|
||||
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="26.1.0.1" />
|
||||
|
|
|
@ -252,8 +252,10 @@
|
|||
<Member Id="M:Xamarin.Essentials.Location.MilesToKilometers(System.Double)" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Accuracy" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Altitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Course" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Latitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Longitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Speed" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.TimestampUtc" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.LocationExtensions" Id="T:Xamarin.Essentials.LocationExtensions">
|
||||
|
@ -279,6 +281,8 @@
|
|||
<Member Id="P:Xamarin.Essentials.MainThread.IsMainThread" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.MapDirectionsMode" Id="T:Xamarin.Essentials.MapDirectionsMode">
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.None" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Bicycling" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
|
|
|
@ -253,8 +253,10 @@
|
|||
<Member Id="M:Xamarin.Essentials.Location.MilesToKilometers(System.Double)" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Accuracy" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Altitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Course" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Latitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Longitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Speed" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.TimestampUtc" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.LocationExtensions" Id="T:Xamarin.Essentials.LocationExtensions">
|
||||
|
@ -280,6 +282,8 @@
|
|||
<Member Id="P:Xamarin.Essentials.MainThread.IsMainThread" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.MapDirectionsMode" Id="T:Xamarin.Essentials.MapDirectionsMode">
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.None" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Bicycling" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
|
|
|
@ -252,8 +252,10 @@
|
|||
<Member Id="M:Xamarin.Essentials.Location.MilesToKilometers(System.Double)" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Accuracy" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Altitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Course" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Latitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Longitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Speed" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.TimestampUtc" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.LocationExtensions" Id="T:Xamarin.Essentials.LocationExtensions">
|
||||
|
@ -279,6 +281,8 @@
|
|||
<Member Id="P:Xamarin.Essentials.MainThread.IsMainThread" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.MapDirectionsMode" Id="T:Xamarin.Essentials.MapDirectionsMode">
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.None" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Bicycling" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
|
|
|
@ -252,8 +252,10 @@
|
|||
<Member Id="M:Xamarin.Essentials.Location.MilesToKilometers(System.Double)" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Accuracy" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Altitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Course" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Latitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Longitude" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.Speed" />
|
||||
<Member Id="P:Xamarin.Essentials.Location.TimestampUtc" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.LocationExtensions" Id="T:Xamarin.Essentials.LocationExtensions">
|
||||
|
@ -279,6 +281,8 @@
|
|||
<Member Id="P:Xamarin.Essentials.MainThread.IsMainThread" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.MapDirectionsMode" Id="T:Xamarin.Essentials.MapDirectionsMode">
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.None" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Bicycling" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<Member Id="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
|
|
|
@ -138,6 +138,26 @@
|
|||
<remarks>Returns 0 or no value if not available.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Course">
|
||||
<MemberSignature Language="C#" Value="public Nullable<double> Course { get; set; }" />
|
||||
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<float64> Course" />
|
||||
<MemberSignature Language="DocId" Value="P:Xamarin.Essentials.Location.Course" />
|
||||
<MemberType>Property</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Nullable<System.Double></ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>Degrees relative to true north.</summary>
|
||||
<value>0..360 in degrees relative to true north. null if unavailable.</value>
|
||||
<remarks>
|
||||
<para />
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CalculateDistance">
|
||||
<MemberSignature Language="C#" Value="public static double CalculateDistance (Xamarin.Essentials.Location locationStart, Xamarin.Essentials.Location locationEnd, Xamarin.Essentials.DistanceUnits units);" />
|
||||
<MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 CalculateDistance(class Xamarin.Essentials.Location locationStart, class Xamarin.Essentials.Location locationEnd, valuetype Xamarin.Essentials.DistanceUnits units) cil managed" />
|
||||
|
@ -348,6 +368,26 @@
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Speed">
|
||||
<MemberSignature Language="C#" Value="public Nullable<double> Speed { get; set; }" />
|
||||
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<float64> Speed" />
|
||||
<MemberSignature Language="DocId" Value="P:Xamarin.Essentials.Location.Speed" />
|
||||
<MemberType>Property</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Nullable<System.Double></ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>Speed in meters per second.</summary>
|
||||
<value>Speed measured by the device..</value>
|
||||
<remarks>
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="TimestampUtc">
|
||||
<MemberSignature Language="C#" Value="public DateTimeOffset TimestampUtc { get; set; }" />
|
||||
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTimeOffset TimestampUtc" />
|
||||
|
|
|
@ -10,14 +10,16 @@
|
|||
<BaseTypeName>System.Enum</BaseTypeName>
|
||||
</Base>
|
||||
<Docs>
|
||||
<summary>To be added.</summary>
|
||||
<remarks>To be added.</remarks>
|
||||
<summary>Directions mode for navigation.</summary>
|
||||
<remarks>
|
||||
<para>Default is none.</para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Members>
|
||||
<Member MemberName="Default">
|
||||
<MemberSignature Language="C#" Value="Default" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Default = int32(0)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<Member MemberName="None">
|
||||
<MemberSignature Language="C#" Value="None" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode None = int32(0)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.None" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
|
@ -28,13 +30,13 @@
|
|||
</ReturnValue>
|
||||
<MemberValue>0</MemberValue>
|
||||
<Docs>
|
||||
<summary>The default MapDirectionsMode on your platform.</summary>
|
||||
<summary>No directions mode for map.</summary>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Driving">
|
||||
<MemberSignature Language="C#" Value="Driving" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Driving = int32(1)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<Member MemberName="Default">
|
||||
<MemberSignature Language="C#" Value="Default" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Default = int32(1)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Default" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
|
@ -45,13 +47,13 @@
|
|||
</ReturnValue>
|
||||
<MemberValue>1</MemberValue>
|
||||
<Docs>
|
||||
<summary>Car route mode.</summary>
|
||||
<summary>The default directions mode on the platform.</summary>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Transit">
|
||||
<MemberSignature Language="C#" Value="Transit" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Transit = int32(2)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
<Member MemberName="Bicycling">
|
||||
<MemberSignature Language="C#" Value="Default" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Default = int32(2)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Bicycling" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
|
@ -62,13 +64,13 @@
|
|||
</ReturnValue>
|
||||
<MemberValue>2</MemberValue>
|
||||
<Docs>
|
||||
<summary>Transit route mode.</summary>
|
||||
<summary>Bicycle route mode.</summary>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Walking">
|
||||
<MemberSignature Language="C#" Value="Walking" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Walking = int32(3)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Walking" />
|
||||
<Member MemberName="Driving">
|
||||
<MemberSignature Language="C#" Value="Driving" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Driving = int32(3)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Driving" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
|
@ -78,6 +80,40 @@
|
|||
<ReturnType>Xamarin.Essentials.MapDirectionsMode</ReturnType>
|
||||
</ReturnValue>
|
||||
<MemberValue>3</MemberValue>
|
||||
<Docs>
|
||||
<summary>Car route mode.</summary>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Transit">
|
||||
<MemberSignature Language="C#" Value="Transit" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Transit = int32(4)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Transit" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>Xamarin.Essentials.MapDirectionsMode</ReturnType>
|
||||
</ReturnValue>
|
||||
<MemberValue>4</MemberValue>
|
||||
<Docs>
|
||||
<summary>Transit route mode.</summary>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Walking">
|
||||
<MemberSignature Language="C#" Value="Walking" />
|
||||
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Essentials.MapDirectionsMode Walking = int32(5)" />
|
||||
<MemberSignature Language="DocId" Value="F:Xamarin.Essentials.MapDirectionsMode.Walking" />
|
||||
<MemberType>Field</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>Xamarin.Essentials.MapDirectionsMode</ReturnType>
|
||||
</ReturnValue>
|
||||
<MemberValue>5</MemberValue>
|
||||
<Docs>
|
||||
<summary>Walking route mode.</summary>
|
||||
</Docs>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<Docs>
|
||||
<summary>Map helpers to open a route to specified places via default platforms maps implementation.</summary>
|
||||
<remarks>
|
||||
<para />
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Members>
|
||||
|
@ -33,10 +33,12 @@
|
|||
<Parameter Name="location" Type="Xamarin.Essentials.Location" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="location">To be added.</param>
|
||||
<summary>To be added.</summary>
|
||||
<returns>To be added.</returns>
|
||||
<remarks>To be added.</remarks>
|
||||
<param name="location">Location to open on maps.</param>
|
||||
<summary>Open the installed application to a specific location.</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="OpenAsync">
|
||||
|
@ -55,9 +57,9 @@
|
|||
<Parameter Name="placemark" Type="Xamarin.Essentials.Placemark" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="placemark">To be added.</param>
|
||||
<summary>To be added.</summary>
|
||||
<returns>To be added.</returns>
|
||||
<param name="placemark">Placemark to open on maps.</param>
|
||||
<summary>Open the installed application to a specific placemark.</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>To be added.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
|
@ -78,11 +80,13 @@
|
|||
<Parameter Name="options" Type="Xamarin.Essentials.MapsLaunchOptions" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="location">To be added.</param>
|
||||
<param name="options">To be added.</param>
|
||||
<summary>To be added.</summary>
|
||||
<returns>To be added.</returns>
|
||||
<remarks>To be added.</remarks>
|
||||
<param name="location">Location to open maps to.</param>
|
||||
<param name="options">Launch options to use.</param>
|
||||
<summary>Open the installed application to a specific location with launch options.</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="OpenAsync">
|
||||
|
@ -102,11 +106,39 @@
|
|||
<Parameter Name="options" Type="Xamarin.Essentials.MapsLaunchOptions" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="placemark">To be added.</param>
|
||||
<param name="options">To be added.</param>
|
||||
<summary>To be added.</summary>
|
||||
<returns>To be added.</returns>
|
||||
<remarks>To be added.</remarks>
|
||||
<param name="placemark">Placemark to open maps to.</param>
|
||||
<param name="options">Launch options to use.</param>
|
||||
<summary>Open the installed application to a specific placemark with launch options..</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="OpenAsync">
|
||||
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task OpenAsync (double latitude, double longitude);" />
|
||||
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task OpenAsync(float64 latitude, float64 longitude) cil managed" />
|
||||
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.Maps.OpenAsync(System.Double,System.Double)" />
|
||||
<MemberType>Method</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Threading.Tasks.Task</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="latitude" Type="System.Double" />
|
||||
<Parameter Name="longitude" Type="System.Double" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="latitude">Latitude to open to.</param>
|
||||
<param name="longitude">Longitude to open to.</param>
|
||||
<summary>Open the installed application to a specific location.</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>
|
||||
<para />
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="OpenAsync">
|
||||
|
@ -127,12 +159,14 @@
|
|||
<Parameter Name="options" Type="Xamarin.Essentials.MapsLaunchOptions" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="latitude">To be added.</param>
|
||||
<param name="longitude">To be added.</param>
|
||||
<param name="options">To be added.</param>
|
||||
<summary>To be added.</summary>
|
||||
<returns>To be added.</returns>
|
||||
<remarks>To be added.</remarks>
|
||||
<param name="latitude">Latitude to open to.</param>
|
||||
<param name="longitude">Longitude to open to.</param>
|
||||
<param name="options">Launch options to use.</param>
|
||||
<summary>Open the installed application to a specific location.</summary>
|
||||
<returns>Task to be completed.</returns>
|
||||
<remarks>
|
||||
<para />
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
|
|
|
@ -43,9 +43,11 @@
|
|||
<ReturnType>Xamarin.Essentials.MapDirectionsMode</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>To be added.</summary>
|
||||
<value>To be added.</value>
|
||||
<remarks>To be added.</remarks>
|
||||
<summary>Directions mode to launch maps for navigation.</summary>
|
||||
<value>Gets the mode.</value>
|
||||
<remarks>
|
||||
<para />
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Name">
|
||||
|
@ -61,9 +63,11 @@
|
|||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>To be added.</summary>
|
||||
<value>To be added.</value>
|
||||
<remarks>To be added.</remarks>
|
||||
<summary>Name of destination to display to user.</summary>
|
||||
<value>Gets the name.</value>
|
||||
<remarks>
|
||||
<para></para>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
|
|
Загрузка…
Ссылка в новой задаче