handleSecondaryTap method

void handleSecondaryTap(
  1. TapPosition position
)
inherited

Implementation

void handleSecondaryTap(TapPosition position) {
  closeFlingAnimationController(MapEventSource.secondaryTap);
  closeDoubleTapController(MapEventSource.secondaryTap);

  final relativePosition = position.relative;
  if (relativePosition == null) return;

  final latlng = _offsetToCrs(relativePosition);
  final onSecondaryTap = options.onSecondaryTap;
  if (onSecondaryTap != null) {
    // emit the event
    onSecondaryTap(position, latlng);
  }

  mapState.emitMapEvent(
    MapEventSecondaryTap(
      tapPosition: latlng,
      center: mapState.center,
      zoom: mapState.zoom,
      source: MapEventSource.secondaryTap,
    ),
  );
}