Skip to content

Commit

Permalink
Show toast for showAccuracyRing in LocationComponentActivity (#2717) …
Browse files Browse the repository at this point in the history
…(#2749)
  • Loading branch information
natiginfo committed Sep 16, 2024
1 parent 322d938 commit a6713bc
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.mapbox.maps.plugin.locationcomponent.createDefault2DPuck
import com.mapbox.maps.plugin.locationcomponent.location
import com.mapbox.maps.testapp.R
import com.mapbox.maps.testapp.databinding.ActivityLocationComponentBinding
import com.mapbox.maps.testapp.examples.annotation.AnnotationUtils.showShortToast
import com.mapbox.maps.testapp.utils.LocationPermissionHelper
import java.lang.ref.WeakReference

Expand Down Expand Up @@ -165,7 +166,11 @@ class LocationComponentActivity : AppCompatActivity() {
return true
}
R.id.action_accuracy_enabled -> {
binding.mapView.location.showAccuracyRing = true
val location = binding.mapView.location
location.showAccuracyRing = true
if (location.locationPuck is LocationPuck3D) {
showShortToast("showAccuracyRing works for 2D location puck only")
}
item.isChecked = true
return true
}
Expand Down

0 comments on commit a6713bc

Please sign in to comment.