MapView interactionOptions in ArcGIS Runtime SDK for Android 100.6.0? Do they exist?

233
2
Jump to solution
11-28-2019 04:33 AM
DenisRomanovas
New Contributor II

Hello!

I am developing an app with ArcGIS Runtime SDK for Android 100.6.0

I am using Android Studio and Kotlin. I don't see interactionOptions property for MapView. Is this for real??

How can I disable map rotation?

0 Kudos
1 Solution

Accepted Solutions
TrevorDraeseke
New Contributor III

Hi Denis,

You can disable rotation touch events by overriding the onRotate function of the `DefaultMapViewOnTouchListener`

mapView.onTouchListener =
object : DefaultMapViewOnTouchListener(applicationContext, mapView) {
override fun onRotate(event: MotionEvent?, rotationAngle: Double): Boolean {
// consume the touch event
return true
}
}

See if this code works for you.

Cheers,

Trevor

View solution in original post

2 Replies
TrevorDraeseke
New Contributor III

Hi Denis,

You can disable rotation touch events by overriding the onRotate function of the `DefaultMapViewOnTouchListener`

mapView.onTouchListener =
object : DefaultMapViewOnTouchListener(applicationContext, mapView) {
override fun onRotate(event: MotionEvent?, rotationAngle: Double): Boolean {
// consume the touch event
return true
}
}

See if this code works for you.

Cheers,

Trevor

View solution in original post

DenisRomanovas
New Contributor II

It works and it was easy! Thank you very much!

0 Kudos