Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[location-plugin] Deprecate location plugin. #28

Merged
merged 5 commits into from
Jan 25, 2021

Conversation

pengdev
Copy link
Member

@pengdev pengdev commented Jan 22, 2021

<changelog>Deprecate location plugin in favour of the Location Component Plugin.</changelog>

@pengdev pengdev requested a review from a team January 22, 2021 18:43
@pengdev pengdev self-assigned this Jan 22, 2021
@pengdev pengdev force-pushed the peng-deprecate-location-plugin branch 2 times, most recently from e92927b to dacb98a Compare January 22, 2021 19:09
Copy link
Contributor

@kiryldz kiryldz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but guess let's merge it after getting in new location component actually 😄

Comment on lines +1 to +65
## Mapbox Maps Location Plugin for Android (Deprecated)

### Overview

The Mapbox Maps Location Plugin for Android is an open source library that provides location awareness to your mobile application. This plugin is a direct port of the Location component from Mapbox Maps SDK v9. It is deprecated in favor of the decoupled Location Component Plugin(handles only the location puck rendering) and a new plugin that handles the camera updates(working in progress).

A full overview of classes and interfaces can be found in our [API documentation](https://docs.mapbox.com/android/maps/overview/).

### Getting Started

This README is intended for developers who are interested in [contributing](https://github.com/mapbox/mapbox-maps-android/blob/master/CONTRIBUTING.md) to the Mapbox Maps Location Plugin for Android. Please visit [DEVELOPING.md](https://github.com/mapbox/mapbox-maps-android/blob/master/DEVELOPING.md) for general information and instructions on how to use the Mapbox Maps Plugin System. To add the location plugin to your project, you configure its dependency in your `build.gradle` files.

```groovy
// In the root build.gradle file
// The Mapbox access token needs to a scope set to DOWNLOADS:READ
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = "INSERT_MAPBOX_ACCESS_TOKEN_HERE"
}
}
}
}
// In the app build.gradle file
dependencies {
implementation 'com.mapbox.plugin:maps-location:10.0.0-beta.11'
}
```

### Example

Initialisation and customizing Mapbox Maps Location Plugin for Android can be done as follows:

```kotlin
val locationPlugin = mapView.getLocationPlugin()
// Activate with a built LocationComponentActivationOptions object
locationPlugin?.let {
it.activateLocationComponent(
LocationComponentActivationOptions
.builder(context, style)
.useDefaultLocationEngine(true)
.locationEngineRequest(
LocationEngineRequest.Builder(750)
.setFastestInterval(750)
.setPriority(LocationEngineRequest.PRIORITY_HIGH_ACCURACY)
.build()
)
.build()
)
it.enabled = true
it.cameraMode = cameraMode
}
```

More concrete examples of the location plugin can be found in our [test application](https://github.com/mapbox/mapbox-maps-android/tree/master/app/src/main/java/com/mapbox/maps/testapp).

#### Dependencies

View [LICENSE.md](LICENSE.md) for all dependencies used by this plugin.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like your review on the README.md for location plugin. cc @tobrun

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will go ahead to merge this PR, we can iterate on the documentation after the code freeze.

@pengdev pengdev requested a review from tobrun January 25, 2021 14:57
@pengdev pengdev force-pushed the peng-deprecate-location-plugin branch 2 times, most recently from 9bcad08 to f22f0bb Compare January 25, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants