Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- points: route.polylinePoints
- .where((point) {
- final latValue = point['latitude'];
- final lngValue = point['longitude'];
- if (latValue is! num || lngValue is! num) {
- return false;
- }
- final lat = latValue.toDouble();
- final lng = lngValue.toDouble();
- return lat >= 41.0 &&
- lat <= 41.5 &&
- lng >= 21.2 &&
- lng <= 21.8;
- })
- .map(
- (point) => LatLng(
- (point['latitude'] as num).toDouble(),
- (point['longitude'] as num).toDouble(),
- ),
- )
- .toList(),
Advertisement
Add Comment
Please, Sign In to add comment