From 9d253fc5e2746380262d0d69f12b49ecd5e16cad Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Mon, 18 Apr 2022 15:22:08 +0530 Subject: [PATCH] up[date --- lib/index/index_controller.dart | 2 +- lib/widgets/map_widget.dart | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index/index_controller.dart b/lib/index/index_controller.dart index b98bc5e..44a1a78 100644 --- a/lib/index/index_controller.dart +++ b/lib/index/index_controller.dart @@ -60,7 +60,7 @@ class IndexController extends GetxController { String getSubInitialVal(){ int min = 0; if(subPerfs.length > 0){ - min = subPerfs[0][0]['id'] as int; + min = int.parse(subPerfs[0][0]['id'].toString()); for(var sub in subPerfs[0]){ int x = int.parse(sub['id'].toString()); // as int; if(x < min){ diff --git a/lib/widgets/map_widget.dart b/lib/widgets/map_widget.dart index b379a5a..19ad5f4 100644 --- a/lib/widgets/map_widget.dart +++ b/lib/widgets/map_widget.dart @@ -30,6 +30,7 @@ class MapWidget extends StatelessWidget { bounds: indexController.currentBound.length > 0 ? indexController.currentBound[0]: LatLngBounds.fromPoints([LatLng(35.03999881162295, 136.40587119778962), LatLng(36.642756778706904, 137.95226720406063)]), zoom: 1, maxZoom: 20, + interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag, plugins: [ MarkerClusterPlugin(), ], @@ -71,7 +72,9 @@ class MapWidget extends StatelessWidget { maxZoom: 265, ), markers:indexController.locations[0].collection.map((i) { + print("i si ${i.properties!['location_id']}"); GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint; + print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}"); return Marker( anchorPos: AnchorPos.align(AnchorAlign.center), height: 70.0,