-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMapboxView.cs
225 lines (206 loc) · 6.49 KB
/
MapboxView.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
namespace MapboxMaui;
using MapboxMaui.Annotations;
using MapboxMaui.Styles;
public partial class MapboxView : View, IMapboxView
{
public static readonly BindableProperty ViewAnnotationsProperty = BindableProperty.Create(
nameof(ViewAnnotations),
typeof(IEnumerable<ViewAnnotationOptions>),
typeof(MapboxView)
);
public IEnumerable<ViewAnnotationOptions> ViewAnnotations
{
get => (IEnumerable<ViewAnnotationOptions>)GetValue(ViewAnnotationsProperty);
set => SetValue(ViewAnnotationsProperty, value);
}
public static readonly BindableProperty AnnotationsProperty = BindableProperty.Create(
nameof(Annotations),
typeof(IEnumerable<IAnnotation>),
typeof(MapboxView)
);
public IEnumerable<IAnnotation> Annotations
{
get => (IEnumerable<IAnnotation>)GetValue(AnnotationsProperty);
set => SetValue(AnnotationsProperty, value);
}
public static readonly BindableProperty SourcesProperty = BindableProperty.Create(
nameof(Sources),
typeof(IEnumerable<MapboxSource>),
typeof(MapboxView)
);
public IEnumerable<MapboxSource> Sources
{
get => (IEnumerable<MapboxSource>)GetValue(SourcesProperty);
set => SetValue(SourcesProperty, value);
}
public static readonly BindableProperty LayersProperty = BindableProperty.Create(
nameof(Layers),
typeof(IEnumerable<MapboxLayer>),
typeof(MapboxView)
);
public IEnumerable<MapboxLayer> Layers
{
get => (IEnumerable<MapboxLayer>)GetValue(LayersProperty);
set => SetValue(LayersProperty, value);
}
public static readonly BindableProperty ImagesProperty = BindableProperty.Create(
nameof(Images),
typeof(IEnumerable<ResolvedImage>),
typeof(MapboxView)
);
public IEnumerable<ResolvedImage> Images
{
get => (IEnumerable<ResolvedImage>)GetValue(ImagesProperty);
set => SetValue(ImagesProperty, value);
}
public static readonly BindableProperty TerrainProperty = BindableProperty.Create(
nameof(Terrain),
typeof(Terrain),
typeof(MapboxView)
);
public Terrain Terrain
{
get => (Terrain)GetValue(TerrainProperty);
set => SetValue(TerrainProperty, value);
}
public static readonly BindableProperty LightProperty = BindableProperty.Create(
nameof(Light),
typeof(Light),
typeof(MapboxView)
);
public Light Light
{
get => (Light)GetValue(LightProperty);
set => SetValue(LightProperty, value);
}
public static readonly BindableProperty DebugOptionsProperty = BindableProperty.Create(
nameof(DebugOptions),
typeof(DebugOption[]),
typeof(MapboxView)
);
public DebugOption[] DebugOptions
{
get => (DebugOption[])GetValue(DebugOptionsProperty);
set => SetValue(DebugOptionsProperty, value);
}
public static readonly BindableProperty ScaleBarVisibilityProperty = BindableProperty.Create(
nameof(ScaleBarVisibility),
typeof(OrnamentVisibility),
typeof(MapboxView),
OrnamentVisibility.Hidden
);
public OrnamentVisibility ScaleBarVisibility
{
get => (OrnamentVisibility)GetValue(ScaleBarVisibilityProperty);
set => SetValue(ScaleBarVisibilityProperty, value);
}
public static readonly BindableProperty CameraOptionsProperty = BindableProperty.Create(
nameof(CameraOptions),
typeof(CameraOptions),
typeof(MapboxView),
default(CameraOptions)
);
public CameraOptions CameraOptions
{
get => (CameraOptions)GetValue(CameraOptionsProperty);
set => SetValue(CameraOptionsProperty, value);
}
public static readonly BindableProperty MapCenterProperty = BindableProperty.Create(
nameof(MapCenter),
typeof(IPosition),
typeof(MapboxView),
default(IPosition)
);
public IPosition MapCenter
{
get => CameraOptions.Center;
set => CameraOptions = CameraOptions with
{
Center = value
};
}
public static readonly BindableProperty MapPaddingProperty = BindableProperty.Create(
nameof(MapPadding),
typeof(Thickness?),
typeof(MapboxView),
default(Thickness?)
);
public Thickness? MapPadding
{
get => CameraOptions.Padding;
set => CameraOptions = CameraOptions with
{
Padding = value
};
}
public static readonly BindableProperty MapAnchorProperty = BindableProperty.Create(
nameof(MapAnchor),
typeof(ScreenPosition?),
typeof(MapboxView),
default(ScreenPosition?)
);
public ScreenPosition? MapAnchor
{
get => CameraOptions.Anchor;
set => CameraOptions = CameraOptions with
{
Anchor = value
};
}
public static readonly BindableProperty MapZoomProperty = BindableProperty.Create(
nameof(MapZoom),
typeof(float?),
typeof(MapboxView),
default(float?)
);
public float? MapZoom
{
get => CameraOptions.Zoom;
set => CameraOptions = CameraOptions with
{
Zoom = value
};
}
public static readonly BindableProperty MapBearingProperty = BindableProperty.Create(
nameof(MapBearing),
typeof(float?),
typeof(MapboxView),
default(float?)
);
public float? MapBearing
{
get => CameraOptions.Bearing;
set => CameraOptions = CameraOptions with
{
Bearing = value
};
}
public static readonly BindableProperty MapPitchProperty = BindableProperty.Create(
nameof(MapPitch),
typeof(float?),
typeof(MapboxView),
default(float?)
);
public float? MapPitch
{
get => CameraOptions.Pitch;
set => CameraOptions = CameraOptions with
{
Pitch = value
};
}
public static readonly BindableProperty MapboxStyleProperty = BindableProperty.Create(
nameof(MapboxStyle),
typeof(MapboxStyle),
typeof(MapboxView),
default(MapboxStyle)
);
public MapboxStyle MapboxStyle
{
get => (MapboxStyle)GetValue(MapboxStyleProperty);
set => SetValue(MapboxStyleProperty, value);
}
public IAnnotationController AnnotationController { get; internal set; }
public IMapFeatureQueryable QueryManager { get; internal set; }
public IMapboxController MapboxController { get; internal set; }
}