emit method

void emit(
  1. Feature<Point>? pointFeature
)

Implementation

void emit(
  turf.Feature<turf.Point>? pointFeature,
) {
  if (_listener != null) {
    if (pointFeature?.geometry != null) {
      _listener!(
          LatLng(pointFeature!.geometry!.coordinates.lat.toDouble(),
              pointFeature.geometry!.coordinates.lng.toDouble()),
          pointFeature.properties?['nearestIndex'],
          pointFeature.properties?['distance']);
    }
  }

  if (_v2Listener != null) {
    if (pointFeature?.geometry != null) {
      _v2Listener!(
          LatLng(pointFeature!.geometry!.coordinates.lat.toDouble(),
              pointFeature.geometry!.coordinates.lng.toDouble()),
          pointFeature.properties?['nearestIndex'],
          pointFeature.properties?['distance'],
          previousLatLng);
    }
  }
}