This commit is contained in:
Mohamed Nouffer
2022-04-18 15:22:08 +05:30
parent 95667a5a57
commit 9d253fc5e2
2 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class IndexController extends GetxController {
String getSubInitialVal(){ String getSubInitialVal(){
int min = 0; int min = 0;
if(subPerfs.length > 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]){ for(var sub in subPerfs[0]){
int x = int.parse(sub['id'].toString()); // as int; int x = int.parse(sub['id'].toString()); // as int;
if(x < min){ if(x < min){

View File

@ -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)]), bounds: indexController.currentBound.length > 0 ? indexController.currentBound[0]: LatLngBounds.fromPoints([LatLng(35.03999881162295, 136.40587119778962), LatLng(36.642756778706904, 137.95226720406063)]),
zoom: 1, zoom: 1,
maxZoom: 20, maxZoom: 20,
interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag,
plugins: [ plugins: [
MarkerClusterPlugin(), MarkerClusterPlugin(),
], ],
@ -71,7 +72,9 @@ class MapWidget extends StatelessWidget {
maxZoom: 265, maxZoom: 265,
), ),
markers:indexController.locations[0].collection.map((i) { markers:indexController.locations[0].collection.map((i) {
print("i si ${i.properties!['location_id']}");
GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint; GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint;
print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
return Marker( return Marker(
anchorPos: AnchorPos.align(AnchorAlign.center), anchorPos: AnchorPos.align(AnchorAlign.center),
height: 70.0, height: 70.0,