Select to view content in your preferred language

Control rotation gesture on zoom

263
4
03-05-2025 09:57 AM
Labels (2)
snlasystem
Occasional Contributor

Is it possible to control the rotation gesture?
If the user want to zoom in/out in the map should the rotation be locked until the user tries to rotate.

0 Kudos
4 Replies
PaulSturm
Esri Contributor

The ArcGISMapViewController has an "interactionOptions" property: https://developers.arcgis.com/flutter/api-reference/reference/arcgis_maps/ArcGISMapViewController/in...

There are several options, but the one you might want is the "snapToNorthThreshold" value. This will be a number in degrees. If, at the end of the user's pinch gesture, the rotation is less than this value, the map will snap to north. This value defaults to 7.5 degrees.

That might not be exactly what you want -- if not, please describe in more detail what sort of behaviour you'd like to see.

0 Kudos
PaulSturm
Esri Contributor

Also, there's another gesture you can use to zoom. It's like a double-tap, but instead of releasing the second tap, keep your finger down and then drag up or down. This will zoom without any possibility of causing a rotation.

0 Kudos
snlasystem
Occasional Contributor

I want it to work like Google Maps app on iOS

If you zoom it do not rotate!

0 Kudos
PaulSturm
Esri Contributor

There's not currently a way to make it behave like Google Maps. I'll create an issue in our internal tracker as a feature request.

0 Kudos