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

Cannot use LocationTrackingActivity #48

Closed
VincentJoshuaET opened this issue Jan 28, 2021 · 0 comments
Closed

Cannot use LocationTrackingActivity #48

VincentJoshuaET opened this issue Jan 28, 2021 · 0 comments
Labels
bug 🪲 Something isn't working

Comments

@VincentJoshuaET
Copy link

https://github.com/mapbox/mapbox-maps-android/blob/main/app/src/main/java/com/mapbox/maps/testapp/examples/LocationTrackingActivity.kt

private fun initLocationComponent(style: Style) {
    val locationPluginImpl = mapView.getLocationPlugin()
    locationPluginImpl.activateLocationComponent(
      LocationComponentActivationOptions
        .builder(this, style)
        .useDefaultLocationEngine(true)
        .locationEngineRequest(
          LocationEngineRequest.Builder(750)
            .setFastestInterval(750)
            .setPriority(LocationEngineRequest.PRIORITY_HIGH_ACCURACY)
            .build()
        )
        .build()
    )
    locationPluginImpl.addOnCameraTrackingChangedListener(this)
    locationPluginImpl.cameraMode = CameraMode.TRACKING_GPS // CameraMode.TRACKING_GPS_NORTH
    locationPluginImpl.renderMode = RenderMode.GPS
    locationPluginImpl.enabled = true
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant