handleLongPress method

void handleLongPress(
  1. TapPosition position
)
inherited

Implementation

void handleLongPress(TapPosition position) {
  _resetDoubleTapHold();

  closeFlingAnimationController(MapEventSource.longPress);
  closeDoubleTapController(MapEventSource.longPress);

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

  mapState.emitMapEvent(
    MapEventLongPress(
      tapPosition: latlng,
      center: mapState.center,
      zoom: mapState.zoom,
      source: MapEventSource.longPress,
    ),
  );
}