Skip to content

Commit b6f9d2c

Browse files
pjleonard37Release SDK bot for Maps SDK team
and
Release SDK bot for Maps SDK team
authored
Update README with additional documenation (#644)
Co-authored-by: Release SDK bot for Maps SDK team <[email protected]>
1 parent d8c8673 commit b6f9d2c

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

README.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mapbox Maps SDK Flutter SDK
22

3-
The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.6.0-rc.1). The SDK allows developers to embed highly customized maps using a Flutter widget on Android and iOS.
3+
The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.6.0-rc.1). The SDK allows developers to embed highly-customized maps using a Flutter widget on Android and iOS.
44

55
Web and desktop are not supported.
66

@@ -54,7 +54,7 @@ The Maps Flutter SDK is compatible with applications:
5454

5555
### Configure credentials
5656
To run the Maps Flutter SDK you will need to configure the Mapbox Access Tokens.
57-
Read more about access tokens and public/secret scopes at the platform [Android](https://docs.mapbox.com/android/maps/guides/install/#configure-credentials) or [iOS](https://docs.mapbox.com/ios/maps/guides/install/#configure-credentials) docs.
57+
Read more about access tokens and public/secret scopes in the platform [Android](https://docs.mapbox.com/android/maps/guides/install/#configure-credentials) or [iOS](https://docs.mapbox.com/ios/maps/guides/install/#step-4-configure-your-public-token) docs.
5858

5959
#### Secret token
6060
To access platform SDKs you will need to create a secret access token with the `Downloads:Read` scope and then:
@@ -69,6 +69,8 @@ To access platform SDKs you will need to create a secret access token with the `
6969
password YOUR_SECRET_MAPBOX_ACCESS_TOKEN
7070
```
7171

72+
To learn more about configuring your secret tokens for iOS, please see step 3 of the [configure credentials section](https://docs.mapbox.com/ios/maps/guides/install/#step-3-configure-your-secret-token) of the iOS Installation Guide.
73+
7274
#### Public token
7375
You can set the access token for Mapbox Maps Flutter SDK(as well as for every Mapbox SDK) via `MapboxOptions`:
7476
```
@@ -129,7 +131,7 @@ Add the following permissions to the manifest:
129131
```
130132

131133
#### iOS
132-
Add the following to the `Runner/Info.plist` to explain why you need access to the location data:
134+
Add the following key/value pair to the `Runner/Info.plist`. In the value field, explain why you need access to location:
133135

134136
```
135137
<key>NSLocationWhenInUseUsageDescription</key>
@@ -148,9 +150,9 @@ void main() {
148150
```
149151

150152
#### MapWidget widget
151-
The `MapWidget` widget provides options to customize the map - you can set `MapOptions`, `CameraOptions`, `styleURL` etc.
153+
The `MapWidget` widget provides options to customize the map - you can set `MapOptions`, `CameraOptions`, `styleURL`, etc.
152154

153-
It also allows or add listeners for various events - related to style loading, map rendering, map loading.
155+
You can also add listeners for various events related to style loading, map rendering, map loading.
154156

155157
#### MapboxMap controller
156158
The `MapboxMap` controller instance is provided with `MapWidget.onMapCreated` callback.
@@ -188,16 +190,16 @@ class FullMapState extends State<FullMap> {
188190
```
189191

190192
## User location
191-
Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/user-location/), [iOS](https://docs.mapbox.com/ios/maps/guides/user-location/).
193+
To observe the user's location and show the location indicator on the map use `LocationComponentSettingsInterface` accessible via `MapboxMap.location`.
192194

193-
To observe the user's location and show the location indicator on the map use `LocationComponentSettingsInterface` accessible via `MapboxMap.location`.
195+
For more information, please see the User Location guides in our [Flutter](https://docs.mapbox.com/flutter/maps/guides/user-location), [Android](https://docs.mapbox.com/android/maps/guides/user-location/), and [iOS](https://docs.mapbox.com/ios/maps/guides/user-location/) documentation.
194196

195197
You need to grant location permission prior to using location component (as explained [before](#configure-permissions)).
196198

197199
### Location puck
198200
To customize the appearance of the location puck call `MapboxMap.location.updateSettings` method.
199201

200-
To use the 3D puck with model downloaded from Uri instead of the default 2D puck :
202+
To use the 3D puck with model downloaded from Uri instead of the default 2D puck:
201203

202204
```
203205
mapboxMap.location.updateSettings(LocationComponentSettings(
@@ -210,11 +212,11 @@ To use the 3D puck with model downloaded from Uri instead of the default 2D puck
210212
You can find more examples of customization in the sample [app](example/lib/location.dart).
211213

212214
## Markers and annotations
213-
Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/annotations/), [iOS](https://docs.mapbox.com/ios/maps/guides/annotations/).
215+
Additional information is available in our [Flutter](https://docs.mapbox.com/flutter/maps/guides/markers-and-annotations/), [Android](https://docs.mapbox.com/android/maps/guides/annotations/), and [iOS](https://docs.mapbox.com/ios/maps/guides/annotations/) documentation.
214216

215217
You have several options to add annotations on the map.
216218

217-
1. Use the AnnotationManager APIs to create circle/point/polygon/polyline annotations.
219+
1. Use the AnnotationManager APIs to create circle, point, polygon, and polyline annotations.
218220

219221
To create 5 point annotations using custom icon:
220222
```
@@ -235,21 +237,21 @@ You can find more examples of the AnnotationManagers usage in the sample app : [
235237
1. Use style layers. This will require writing more code but is more flexible and provides better performance for the large amount of annotations (e.g. hundreds and thousands of them). More about adding style layers in the [Map styles section](#map-styles).
236238

237239
## Map styles
238-
Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/styles/), [iOS](https://docs.mapbox.com/ios/maps/guides/styles/).
240+
Additional information is available in our [Flutter](https://docs.mapbox.com/flutter/maps/guides/styles/), [Android](https://docs.mapbox.com/android/maps/guides/styles/), and [iOS](https://docs.mapbox.com/ios/maps/guides/styles/) documentation.
239241

240242
The Mapbox Maps Flutter SDK allows full customization of the look of the map used in your application.
241243

242244
### Set a style
243-
You can specify the initial style uri at `MapWidget.styleUri`, or load it at runtime using `MapboxMap.loadStyleURI` / `MapboxMap.loadStyleJson` :
245+
You can specify the initial style uri at `MapWidget.styleUri`, or load it at runtime using `MapboxMap.loadStyleURI` / `MapboxMap.loadStyleJson`:
244246

245247
```
246-
mapboxMap.loadStyleURI(Styles.LIGHT);
248+
mapboxMap.loadStyleURI(Styles.LIGHT);
247249
```
248250

249251
### Work with layers
250-
You can familiarize with the concept of sources, layers and their supported types in the platform documentation.
252+
You can familiarize with the concept of sources, layers and their supported types in the documentation for [Flutter](https://docs.mapbox.com/flutter/maps/guides/styles/work-with-layers), [iOS](https://docs.mapbox.com/ios/maps/guides/styles/work-with-layers/), and [Android](https://docs.mapbox.com/android/maps/guides/styles/work-with-layers/).
251253

252-
To add, remove or change a source or a layer use the `MapboxMap.style` object.
254+
To add, remove or change a source or a layer, use the `MapboxMap.style` object.
253255

254256
To add a `GeoJsonSource` and a `LineLayer` using the source :
255257
```
@@ -267,19 +269,21 @@ To add a `GeoJsonSource` and a `LineLayer` using the source :
267269

268270
### Using expressions
269271
You can change the appearance of a layer based on properties in the layer's data source or zoom level.
270-
Refer to the [documentation](https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/) for the description of supported expressions.
272+
Refer to the [documentation](https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/) for the description of supported expressions. You can also learn more in the documentation for [Flutter](https://docs.mapbox.com/flutter/maps/guides/styles/style-layers#work-with-expressions), [iOS](https://docs.mapbox.com/ios/maps/guides/styles/style-layers/#work-with-expressions), and [Android](https://docs.mapbox.com/android/maps/guides/styles/style-layers/#work-with-expressions).
273+
271274
To apply an expression to interpolate gradient color to a line layer:
272275
```
273276
mapboxMap.style.setStyleLayerProperty("layer", "line-gradient",
274277
'["interpolate",["linear"],["line-progress"],0.0,["rgb",6,1,255],0.5,["rgb",0,255,42],0.7,["rgb",255,252,0],1.0,["rgb",255,30,0]]');
275278
```
276279

277280
## Camera and animations
278-
Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/camera-and-animation/), [iOS](https://docs.mapbox.com/ios/maps/guides/camera-and-animation/).
281+
Platform docs: [Android](https://docs.mapbox.com/android/maps/guides/camera-and-animation/), [iOS](https://docs.mapbox.com/ios/maps/guides/camera-and-animation/).
282+
279283
The camera is the user's viewpoint above the map. The Maps Flutter SDK provides you with options to set and adjust the camera position, listen for camera changes, get the camera position, and restrict the camera position to set bounds.
280284

281285
### Camera position
282-
You can set the starting camera position using `MapWidget.cameraOptions` :
286+
You can set the starting camera position using `MapWidget.cameraOptions`:
283287

284288
```
285289
MapWidget(
@@ -316,7 +320,7 @@ To start a `flyTo` animation to the specific camera options :
316320
You can find more examples of animations in the sample [app](example/lib/animation.dart).
317321

318322
## User interaction
319-
Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/user-interaction/), [iOS](https://docs.mapbox.com/ios/maps/guides/user-interaction/).
323+
Platform docs: [Android](https://docs.mapbox.com/android/maps/guides/user-interaction/), [iOS](https://docs.mapbox.com/ios/maps/guides/user-interaction/).
320324

321325
Users interacting with the map in your application can explore the map by performing standard gestures.
322326

0 commit comments

Comments
 (0)