Disabling flutter_map package rotation in Flutter

Viewed 2816

How do you disable the rotation of the map in flutter_map?

2 Answers

As written by @pskink the answer is to use the InteractiveFlag provided by flutter_map in such a way

MapOptions(
    minZoom: 11.0,
    maxZoom: 17.0,
    center: LatLng(lat, lng),
    interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag,
    zoom: 13.0,
  ),

By doing this, you can ensure that only pinchZoom and drag actions are allowed in your map.

Related