Skip to content

Commit c7b63cd

Browse files
Add more detail documentation Android test app, one minor typo. (#3173)
1 parent 6f5b72f commit c7b63cd

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

docs/mdbook/src/platforms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can find an app that uses GLFW in [`platform/glfw`](https://github.com/mapli
2626

2727
Originally the project only supported OpenGL 2.0. In 2023, the [renderer was modularized](https://github.com/maplibre/maplibre-native/blob/main/design-proposals/2022-10-27-rendering-modularization.md) allowing for the implementation of alternate rendering backends. The first alternate rendering backend that was implemented was [Metal](https://maplibre.org/news/2024-01-19-metal-support-for-maplibre-native-ios-is-here/), followed by [Vulkan](https://maplibre.org/news/2024-12-12-maplibre-android-vulkan/). In the future other rendering backends could be implemented such as WebGPU.
2828

29-
What platfroms support which rendering backend can be found below.
29+
What platforms support which rendering backend can be found below.
3030

3131
| Platform | OpenGL ES 3.0 | Vulkan 1.0 | Metal |
3232
|---|---|---|---|

platform/android/docs/getting-started.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Quickstart
22

3-
1. Add bintray Maven repositories to your project-level Gradle file (usually `<project>/<app-module>/build.gradle`).
3+
To follow this example from scratch, in Android Studio create a new "Empty Views Activity" and then select "Kotlin" as the language. Select "Groovy DSL" as the build configuration language.
4+
5+
1. If you have an older project, you'll need to add bintray Maven repositories to your project-level Gradle file (usually `<project>/<app-module>/build.gradle`). Add `mavenCentral()` to where repositories are already defined in that file, something like this:
46

57
```gradle
68
allprojects {
@@ -11,13 +13,15 @@
1113
}
1214
```
1315
14-
2. Add the library as a dependency into your module Gradle file (usually `<project>/<app-module>/build.gradle`). Replace `<version>` with the [latest MapLibre Android version](https://github.com/maplibre/maplibre-native/releases?q=android-v11&expanded=true) (e.g.: `org.maplibre.gl:android-sdk:11.5.2`):
16+
A newly-created app will likely already have `mavenCentral()` in a top-level `settings.gradle` file, and you won't need to add it.
17+
18+
2. Add the library as a dependency into your module Gradle file (usually `<project>/<app-module>/build.gradle`). Replace `<version>` with the [latest MapLibre Android version](https://github.com/maplibre/maplibre-native/releases?q=android-v11&expanded=true) (e.g.: `org.maplibre.gl:android-sdk:11.8.0`):
1519
1620
```gradle
1721
dependencies {
1822
...
1923
implementation 'org.maplibre.gl:android-sdk:<version>'
20-
...
24+
2125
}
2226
```
2327
@@ -35,17 +39,16 @@
3539
...
3640
```
3741
38-
5. Initialize the `MapView` in your `MainActivity` file by following the example below:
42+
5. Initialize the `MapView` in your `MainActivity` file by following the example below. If modifying a newly-created "Empty Views Activity" example, it replaces all the Kotlin code after the "package" line.
3943
4044
```kotlin
4145
import androidx.appcompat.app.AppCompatActivity
4246
import android.os.Bundle
4347
import android.view.LayoutInflater
44-
import org.maplibre.android.Maplibre
48+
import org.maplibre.android.MapLibre
4549
import org.maplibre.android.camera.CameraPosition
4650
import org.maplibre.android.geometry.LatLng
4751
import org.maplibre.android.maps.MapView
48-
import org.maplibre.android.testapp.R
4952
5053
class MainActivity : AppCompatActivity() {
5154

0 commit comments

Comments
 (0)