This commit is contained in:
Mohamed Nouffer
2022-03-15 18:19:34 +05:30
parent 9090a76cf3
commit 92bb6b8dcd
13 changed files with 363 additions and 95 deletions

View File

@ -50,5 +50,29 @@ class HomeController extends GetxController {
}
}
void makePrevious(GeoJsonFeature fs){
GeoJsonFeature<GeoJsonMultiPoint> pt = fs as GeoJsonFeature<GeoJsonMultiPoint>;
for(int i=0; i<= locations[0].collection.length - 1; i++){
GeoJsonMultiPoint p = locations[0].collection[i].geometry as GeoJsonMultiPoint;
if(p.geoSerie!.geoPoints[0].latitude == pt.geometry!.geoSerie!.geoPoints[0].latitude && p.geoSerie!.geoPoints[0].longitude == pt.geometry!.geoSerie!.geoPoints[0].longitude ){
if(currentFeature.length > 0){
currentFeature.clear();
}
if(i == 0 ){
currentFeature.add(locations[0].collection[locations[0].collection.length -1] as GeoJsonFeature);
}
else{
currentFeature.add(locations[0].collection[i - 1] as GeoJsonFeature);
}
}
}
}
}