Parse doubles
This commit is contained in:
parent
32f3f065ae
commit
07d28414be
1 changed files with 3 additions and 3 deletions
|
|
@ -388,19 +388,19 @@ class _genericMapState extends State<genericMap> {
|
||||||
falsePosList.forEach((falsePos) {
|
falsePosList.forEach((falsePos) {
|
||||||
var coords = falsePos['geo']['coordinates'];
|
var coords = falsePos['geo']['coordinates'];
|
||||||
// print('false pos: ${coords}');
|
// 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));
|
markers.add(FireMarker(loc, FireMarkType.falsePos));
|
||||||
if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel));
|
if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel));
|
||||||
});
|
});
|
||||||
industries.forEach((industry) {
|
industries.forEach((industry) {
|
||||||
// print(fire['geo']['coordinates']);
|
// print(fire['geo']['coordinates']);
|
||||||
var coords = industry['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));
|
markers.add(FireMarker(loc, FireMarkType.industry));
|
||||||
if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel));
|
if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel));
|
||||||
});
|
});
|
||||||
fires.forEach((fire) {
|
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(
|
markers.add(
|
||||||
FireMarker(loc, FireMarkType.fire, () => print('marker pressed')));
|
FireMarker(loc, FireMarkType.fire, () => print('marker pressed')));
|
||||||
markers.add(FireMarker(loc, FireMarkType.pixel));
|
markers.add(FireMarker(loc, FireMarkType.pixel));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue