OwnWeb / flutter_map_tappable_polyline

A tappable Polyline plugin for flutter_map
https://pub.dev/packages/flutter_map_tappable_polyline
MIT License
54 stars 44 forks source link

support polyline culling for increased performance #5

Closed Mkohm closed 4 years ago

Mkohm commented 4 years ago

Got it working 👍 - simply looked into the implementation of polylineculling on a normal polyline and copied it into PolylineLayer. It is not very DRY, but i guess it is okay since we are not able to directly do any changes on the flutter_map implementation.

if (polylineOpts.polylineCulling &&
          !polylineOpt.boundingBox.isOverlapping(map.bounds)) {
           // Skip this polyline as it is not within the current map bounds (i.e not visible on screen)
          continue;
}
tuarrep commented 4 years ago

Indeed it is. But ya it must be set to false by default to expose a clear signature

tuarrep commented 4 years ago

Nice addition @Mkohm thanks a lot 🙏

I added some review comments from my phone, I'll test it in that day.

tuarrep commented 4 years ago

:rocket: Released in v0.4.0