-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathPointAnnotationManager.cs
172 lines (166 loc) · 5.49 KB
/
PointAnnotationManager.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
namespace MapboxMaui.Annotations;
using System.Linq;
using Foundation;
using MapboxMapsObjC;
public partial class PointAnnotationManager
: AnnotationManager<TMBPointAnnotationManager, PointAnnotation>
, IPointAnnotationManager
{
private readonly TMBPointAnnotationManager nativeManager;
public PointAnnotationManager(
string id,
TMBPointAnnotationManager nativeManager
)
: base(id, nativeManager)
{
this.nativeManager = nativeManager;
}
public bool? IconAllowOverlap
{
get => nativeManager.IconAllowOverlap?.BoolValue;
set => nativeManager.IconAllowOverlap = value;
}
public bool? IconIgnorePlacement
{
get => nativeManager.IconIgnorePlacement?.BoolValue;
set => nativeManager.IconIgnorePlacement = value;
}
public bool? IconKeepUpright
{
get => nativeManager.IconKeepUpright?.BoolValue;
set => nativeManager.IconKeepUpright = value;
}
public bool? IconOptional
{
get => nativeManager.IconOptional?.BoolValue;
set => nativeManager.IconOptional = value;
}
public double? IconPadding
{
get => nativeManager.IconPadding?.DoubleValue;
set => nativeManager.IconPadding = value;
}
public IconPitchAlignment? IconPitchAlignment
{
get => nativeManager.IconPitchAlignment?.RawValue;
set => nativeManager.IconPitchAlignment = value?.ToPlatform();
}
public IconRotationAlignment? IconRotationAlignment
{
get => nativeManager.IconRotationAlignment?.RawValue;
set => nativeManager.IconRotationAlignment = value?.ToPlatform();
}
public bool? SymbolAvoidEdges
{
get => nativeManager.SymbolAvoidEdges?.BoolValue;
set => nativeManager.SymbolAvoidEdges = value;
}
public SymbolPlacement? SymbolPlacement
{
get => nativeManager.SymbolPlacement?.RawValue;
set => nativeManager.SymbolPlacement = value?.ToPlatform();
}
public double? SymbolSpacing
{
get => nativeManager.SymbolSpacing?.DoubleValue;
set => nativeManager.SymbolSpacing = value;
}
public SymbolZOrder? SymbolZOrder
{
get => nativeManager.SymbolZOrder?.RawValue;
set => nativeManager.SymbolZOrder = value?.ToPlatform();
}
public bool? TextAllowOverlap
{
get => nativeManager.TextAllowOverlap?.BoolValue;
set => nativeManager.TextAllowOverlap = value;
}
public string[] TextFont
{
get => nativeManager.TextFont;
set => nativeManager.TextFont = value;
}
public bool? TextIgnorePlacement
{
get => nativeManager.TextIgnorePlacement?.BoolValue;
set => nativeManager.TextIgnorePlacement = value;
}
public bool? TextKeepUpright
{
get => nativeManager.TextKeepUpright?.BoolValue;
set => nativeManager.TextKeepUpright = value;
}
public double? TextMaxAngle
{
get => nativeManager.TextMaxAngle?.DoubleValue;
set => nativeManager.TextMaxAngle = value;
}
public bool? TextOptional
{
get => nativeManager.TextOptional?.BoolValue;
set => nativeManager.TextOptional = value;
}
public double? TextPadding
{
get => nativeManager.TextPadding?.DoubleValue;
set => nativeManager.TextPadding = value;
}
public TextPitchAlignment? TextPitchAlignment
{
get => nativeManager.TextPitchAlignment?.RawValue;
set => nativeManager.TextPitchAlignment = value?.ToPlatform();
}
public TextRotationAlignment? TextRotationAlignment
{
get => nativeManager.TextRotationAlignment?.RawValue;
set => nativeManager.TextRotationAlignment = value?.ToPlatform();
}
public TextAnchor[] TextVariableAnchor
{
get => nativeManager.TextVariableAnchor?
.Select(x => (TextAnchor)x.RawValue)
.ToArray() ?? Array.Empty<TextAnchor>();
set => nativeManager.TextVariableAnchor = value?
.Select(x => x.ToPlatform())
.ToArray();
}
public TextWritingMode[] TextWritingMode
{
get => nativeManager.TextWritingMode?
.Select(x => (TextWritingMode)x.RawValue)
.ToArray() ?? Array.Empty<TextWritingMode>();
set => nativeManager.TextWritingMode = value?
.Select(x => x.ToPlatform())
.ToArray();
}
public double[] IconTranslate
{
get => nativeManager.IconTranslate?
.Select(x => x.DoubleValue)
.ToArray() ?? Array.Empty<double>();
set => nativeManager.IconTranslate = value?
.Select(NSNumber.FromDouble)
.ToArray();
}
public IconTranslateAnchor? IconTranslateAnchor
{
get => nativeManager.IconTranslateAnchor?.RawValue;
set => nativeManager.IconTranslateAnchor = value?.ToPlatform();
}
public double[] TextTranslate
{
get => nativeManager.TextTranslate?
.Select(x => x.DoubleValue)
.ToArray() ?? Array.Empty<double>();
set => nativeManager.TextTranslate = value?
.Select(NSNumber.FromDouble)
.ToArray();
}
public TextTranslateAnchor? TextTranslateAnchor
{
get => nativeManager.TextTranslateAnchor?.RawValue;
set => nativeManager.TextTranslateAnchor = value?.ToPlatform();
}
protected override ITMBAnnotation ToPlatformAnnotationOption(PointAnnotation annotation)
=> annotation.ToPlatformValue();
}