mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-04-05 17:37:51 +08:00
26 lines
552 B
C#
26 lines
552 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace CPF.Mac.CoreLocation
|
|
{
|
|
public struct CLLocationCoordinate2D
|
|
{
|
|
public double Latitude;
|
|
|
|
public double Longitude;
|
|
|
|
public CLLocationCoordinate2D(double latitude, double longitude)
|
|
{
|
|
Latitude = latitude;
|
|
Longitude = longitude;
|
|
}
|
|
|
|
[DllImport("/System/Library/Frameworks/CoreLocation.framework/CoreLocation")]
|
|
private static extern int CLLocationCoordinate2DIsValid(CLLocationCoordinate2D cord);
|
|
|
|
public bool IsValid()
|
|
{
|
|
return CLLocationCoordinate2DIsValid(this) != 0;
|
|
}
|
|
}
|
|
}
|