dzocesrce

Untitled

Apr 7th, 2026
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. points: route.polylinePoints
  2. .where((point) {
  3. final latValue = point['latitude'];
  4. final lngValue = point['longitude'];
  5.  
  6. if (latValue is! num || lngValue is! num) {
  7. return false;
  8. }
  9.  
  10. final lat = latValue.toDouble();
  11. final lng = lngValue.toDouble();
  12.  
  13. return lat >= 41.0 &&
  14. lat <= 41.5 &&
  15. lng >= 21.2 &&
  16. lng <= 21.8;
  17. })
  18. .map(
  19. (point) => LatLng(
  20. (point['latitude'] as num).toDouble(),
  21. (point['longitude'] as num).toDouble(),
  22. ),
  23. )
  24. .toList(),
Advertisement
Add Comment
Please, Sign In to add comment