Skip to content

Commit 7c41f4e

Browse files
committed
- empty example for gesture settings
1 parent f54b939 commit 7c41f4e

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace MapboxMauiQs;
2+
3+
public class GestureSettingsExample : ContentPage, IExamplePage, IQueryAttributable
4+
{
5+
MapboxView map;
6+
IExampleInfo info;
7+
8+
public GestureSettingsExample()
9+
{
10+
iOSPage.SetUseSafeArea(this, false);
11+
Content = map = new MapboxView();
12+
13+
map.MapReady += Map_MapReady;
14+
map.MapLoaded += Map_MapLoaded;
15+
}
16+
17+
public void ApplyQueryAttributes(IDictionary<string, object> query)
18+
{
19+
info = query["example"] as IExampleInfo;
20+
21+
Title = info?.Title;
22+
}
23+
24+
private void Map_MapReady(object sender, EventArgs e)
25+
{
26+
var centerLocation = new MapPosition(21.0278, 105.8342);
27+
var cameraOptions = new CameraOptions
28+
{
29+
Center = centerLocation,
30+
Zoom = 14,
31+
};
32+
33+
map.CameraOptions = cameraOptions;
34+
map.MapboxStyle = MapboxStyle.MAPBOX_STREETS;
35+
}
36+
37+
private void Map_MapLoaded(object sender, EventArgs e)
38+
{
39+
// Setup Styles, Annotations, etc here
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace MapboxMauiQs;
2+
3+
class GestureSettingsExampleInfo : IExampleInfo
4+
{
5+
public string Group => "Lab";
6+
public string Title => "Gesture Settings";
7+
public string Subtitle => "Enable and disable default gestures.";
8+
public string PageRoute => typeof(GestureSettingsExample).FullName;
9+
public int GroupIndex => 0;
10+
public int Index => 66;
11+
}

0 commit comments

Comments
 (0)