rotate method

  1. @override
bool rotate(
  1. double degree, {
  2. String? id,
})
override

Rotates the map to a decimal degree around the current center, where 0° is North

See rotateAroundPoint to rotate the map around a custom screen point.

id is an internally meaningless attribute, but it is passed through to the emitted MapEventRotate.

The emitted MapEventRotate.source property will be MapEventSource.mapController.

Returns true and emits a MapEventRotate event (which can be listed to through MapEventCallbacks, such as MapOptions.onMapEvent), unless the move failed because degree (after adjustment when necessary) was equal to the current value.

Implementation

@override
bool rotate(double degree, {String? id}) => _internalController.rotate(
      degree,
      hasGesture: false,
      source: MapEventSource.mapController,
      id: id,
    );