From 07d28414bec64b730a1071c4d06081fe5d275785 Mon Sep 17 00:00:00 2001 From: "Vicente J. Ruiz Jurado" Date: Wed, 15 Aug 2018 20:45:13 +0200 Subject: [PATCH] Parse doubles --- lib/genericMap.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/genericMap.dart b/lib/genericMap.dart index 157a48e..018ff9f 100644 --- a/lib/genericMap.dart +++ b/lib/genericMap.dart @@ -388,19 +388,19 @@ class _genericMapState extends State { falsePosList.forEach((falsePos) { var coords = falsePos['geo']['coordinates']; // print('false pos: ${coords}'); - var loc = LatLng(coords[1], coords[0]); + var loc = LatLng(double.parse(coords[1]), double.parse(coords[0])); markers.add(FireMarker(loc, FireMarkType.falsePos)); if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel)); }); industries.forEach((industry) { // print(fire['geo']['coordinates']); var coords = industry['geo']['coordinates']; - var loc = LatLng(coords[1], coords[0]); + var loc = LatLng(double.parse(coords[1]), double.parse(coords[0])); markers.add(FireMarker(loc, FireMarkType.industry)); if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel)); }); fires.forEach((fire) { - var loc = new LatLng(fire['lat'], fire['lon']); + var loc = new LatLng(double.parse(fire['lat']), double.parse(fire['lon'])); markers.add( FireMarker(loc, FireMarkType.fire, () => print('marker pressed'))); markers.add(FireMarker(loc, FireMarkType.pixel));