blob: 0f5df42346797bdaec16bb34817c386fbcbc0f7c (
plain)
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
56
|
#if __MOBILE__
using UIKit;
using Xamarin.Forms.Maps.iOS;
#else
using Xamarin.Forms.Maps.MacOS;
#endif
namespace Xamarin
{
public static class FormsMaps
{
static bool s_isInitialized;
#if __MOBILE__
static bool? s_isiOs8OrNewer;
static bool? s_isiOs9OrNewer;
static bool? s_isiOs10OrNewer;
internal static bool IsiOs8OrNewer
{
get
{
if (!s_isiOs8OrNewer.HasValue)
s_isiOs8OrNewer = UIDevice.CurrentDevice.CheckSystemVersion(8, 0);
return s_isiOs8OrNewer.Value;
}
}
internal static bool IsiOs9OrNewer
{
get
{
if (!s_isiOs9OrNewer.HasValue)
s_isiOs9OrNewer = UIDevice.CurrentDevice.CheckSystemVersion(9, 0);
return s_isiOs9OrNewer.Value;
}
}
internal static bool IsiOs10OrNewer
{
get
{
if (!s_isiOs10OrNewer.HasValue)
s_isiOs10OrNewer = UIDevice.CurrentDevice.CheckSystemVersion(10, 0);
return s_isiOs10OrNewer.Value;
}
}
#endif
public static void Init()
{
if (s_isInitialized)
return;
GeocoderBackend.Register();
s_isInitialized = true;
}
}
}
|