forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructs.cs
55 lines (47 loc) · 1.36 KB
/
Structs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Runtime.InteropServices;
using CoreLocation;
using ObjCRuntime;
namespace Google.Maps
{
[StructLayout (LayoutKind.Sequential)]
public struct VisibleRegion
{
public CLLocationCoordinate2D NearLeft;
public CLLocationCoordinate2D NearRight;
public CLLocationCoordinate2D FarLeft;
public CLLocationCoordinate2D FarRight;
public VisibleRegion (double nearLeftLatitude, double nearLeftLongitude,
double nearRightLatitude, double nearRightLongitude,
double farLeftLatitude, double farLeftLongitude,
double farRightLatitude, double farRightLongitude)
{
NearLeft = new CLLocationCoordinate2D (nearLeftLatitude, nearLeftLongitude);
NearRight = new CLLocationCoordinate2D (nearRightLatitude, nearRightLongitude);
FarLeft = new CLLocationCoordinate2D (farLeftLatitude, farLeftLongitude);
FarRight = new CLLocationCoordinate2D (farRightLatitude, farRightLongitude);
}
}
[StructLayout (LayoutKind.Sequential)]
public struct Orientation
{
public double Heading;
public double Pitch;
public Orientation (double heading, double pitch)
{
Heading = heading;
Pitch = pitch;
}
}
[StructLayout (LayoutKind.Sequential)]
public struct MapPoint
{
public double X;
public double Y;
public MapPoint (float x, float y)
{
X = x;
Y = y;
}
}
}