getBounds method

  1. @override
LatLngBounds getBounds(
  1. InteractivePolyline<Object> item
)
override

Get the bounds of the item for spatial indexing.

Implementation

@override
LatLngBounds getBounds(InteractivePolyline item) {
  if (item.points.isEmpty) {
    return LatLngBounds(const LatLng(0, 0), const LatLng(0, 0));
  }
  return LatLngBounds.fromPoints(item.points);
}