longPressed method

void longPressed(
  1. MapEventSource source,
  2. TapPosition tapPosition,
  3. LatLng position
)

Called when a long-press gesture has happened, calls the MapOptions.onLongPress callback and emits a MapEventLongPress event.

Implementation

void longPressed(
  MapEventSource source,
  TapPosition tapPosition,
  LatLng position,
) {
  options.onLongPress?.call(tapPosition, position);
  _emitMapEvent(
    MapEventLongPress(
      tapPosition: position,
      camera: camera,
      source: MapEventSource.longPress,
    ),
  );
}