Skip to content

Commit

Permalink
Maplibre docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas committed Apr 17, 2021
1 parent eba5d13 commit acec80f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PR Title ([#123](link to my pr))

----
## NEXT
Allow MapLibre as an option ([#1311](https://github.com/react-native-mapbox-gl/maps/pull/1311))
Fix native UserLocation on Android ([#1284](https://github.com/react-native-mapbox-gl/maps/pull/1284))
Add getClusterExpansionZoom to ShapeSource ([#1279](https://github.com/react-native-mapbox-gl/maps/pull/1279))
Add type definition for AnimatedPoint ([#1280](https://github.com/react-native-mapbox-gl/maps/pull/1280))
Expand Down
39 changes: 39 additions & 0 deletions android/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,42 @@ Check the current version of the SDK [here](https://docs.mapbox.com/android/maps


If you are using version newer versions of the SDK, you will need to authorize your download of the Maps SDK with a secret access token with the DOWNLOADS:READ scope. This [guide](https://docs.mapbox.com/android/maps/guides/install/#configure-credentials) explains how to configure the secret token under section `Configure your secret token`.

## Using MapLibre

[MapLibre](https://github.com/maplibre/maplibre-gl-native) is an OSS fork of MapboxGL

Overwrite mapbox dependecies within your `android/build.gradle`

```
buildscript {
ext {
...
rnmbglMapboxLibs = {
implementation ("org.maplibre.gl:android-sdk:9.2.1")
implementation ("com.mapbox.mapboxsdk:mapbox-sdk-turf:5.3.0")
}
rnmbglMapboxPlugins = {
implementation ("com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0")
implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0") {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
}
implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0") {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
}
implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0") {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
}
}
}
}
repositories {
...
maven {
url = "https://dl.bintray.com/maplibre/maplibre-gl-native"
}
}
```
34 changes: 33 additions & 1 deletion ios/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,36 @@ Check the current version of the SDK [here](https://docs.mapbox.com/ios/maps/ove

### Mapbox Maps SDK > `v6.0.0`

If you are using version `v6.0.0` of the SDK or later, you will need to authorize your download of the Maps SDK with a secret access token with the `DOWNLOADS:READ` scope. This [guide](https://docs.mapbox.com/ios/maps/overview/#install-the-sdk) explains how to configure the secret token under section `Configure your secret token`.
If you are using version `v6.0.0` of the SDK or later, you will need to authorize your download of the Maps SDK with a secret access token with the `DOWNLOADS:READ` scope. This [guide](https://docs.mapbox.com/ios/maps/overview/#install-the-sdk) explains how to configure the secret token under section `Configure your secret token`.

### Maplibre

## Using MapLibre

[MapLibre](https://github.com/maplibre/maplibre-gl-native) is an OSS fork of MapboxGL

Overwrite mapbox dependecies within your `ios/Podfile`:



```
$RNMBGL_Use_SPM = {
url: "https://github.com/maplibre/maplibre-gl-native-distribution",
requirement: {
kind: "upToNextMajorVersion",
minimumVersion: "5.11.0"
},
product_name: "Mapbox"
}
pre_install do |installer|
$RNMBGL.pre_install(installer)
...
end
post_install do |installer|
$RNMBGL.post_install(installer)
...
end
```

0 comments on commit acec80f

Please sign in to comment.