You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,49 @@ embedded interactive and customizable vector maps inside of a Flutter widget. Th
11
11
12
12
### Android
13
13
14
-
This demo app uses Mapbox vector tiles, which require a Mapbox account and a Mapbox access token. Obtain a free access token on [your Mapbox account page](https://www.mapbox.com/account/access-tokens/).
14
+
Following examples use Mapbox vector tiles, which require a Mapbox account and a Mapbox access token. Obtain a free access token on [your Mapbox account page](https://www.mapbox.com/account/access-tokens/). After you get the key, place it in project's Android directory:
15
+
- Create a `local.properties` file with the following path: `$project_dir/android/local.properties`
- Run the app with `cd flutter_mapbox/example && flutter run`
22
24
25
+
#### New project
26
+
27
+
- Create new Flutter project in your IDE or via terminal
28
+
- Add `mapbox_gl: ^0.0.1` dependency to `pubspec.yaml` file and [get the package](https://flutter.io/using-packages/#adding-a-package-dependency-to-an-app)
29
+
- Add Mapbox dependency and read token value in Android module `build.gradle` file:
- Import Mapbox widgets and add them to your widget tree
52
+
```
53
+
import 'package:mapbox_gl/controller.dart';
54
+
import 'package:mapbox_gl/flutter_mapbox.dart';
55
+
import 'package:mapbox_gl/overlay.dart';
56
+
```
23
57
24
58
## Documentation
25
59
@@ -39,4 +73,4 @@ This README file currently houses all of the documentation for this Flutter proj
39
73
40
74
We welcome contributions to this repository!
41
75
42
-
If you're interested in helping build this Mapbox/Flutter integration, please read [the contribution guide](https://github.com/mapbox/flutter-mapbox-gl/blob/master/CONTRIBUTING.md) to learn how to get started.
76
+
If you're interested in helping build this Mapbox/Flutter integration, please read [the contribution guide](https://github.com/mapbox/flutter-mapbox-gl/blob/master/CONTRIBUTING.md) to learn how to get started.
0 commit comments