大幅変更&環境バージョンアップ

This commit is contained in:
2024-08-22 14:35:09 +09:00
parent 56e9861c7a
commit dc58dc0584
446 changed files with 29645 additions and 8315 deletions

View File

@ -1,36 +1,33 @@
import 'package:geojson/geojson.dart';
import 'package:http/http.dart' as http;
// import 'package:geojson/geojson.dart';
// import 'package:http/http.dart' as http;
import '../utils/const.dart';
// import '../utils/const.dart';
class LocationPolygonervice{
// class LocationPolygonervice {
// static Future<GeoJsonFeature?> loadLocationLines() async {
// final geo = GeoJson();
// GeoJsonFeature? fs;
static Future<GeoJsonFeature?> loadLocationLines() async {
final geo = GeoJson();
GeoJsonFeature? fs;
// String serverUrl = ConstValues.currentServer();
// String url = '$serverUrl/api/location_polygon/';
// //print('++++++++$url');
// final response = await http.get(
// Uri.parse(url),
// headers: <String, String>{
// 'Content-Type': 'application/json; charset=UTF-8',
// },
// );
String serverUrl = ConstValues.currentServer();
String url = '$serverUrl/api/location_polygon/';
print('++++++++$url');
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
// if (response.statusCode == 200) {
// geo.processedFeatures.listen((fst) {
// fs = fst;
// });
if (response.statusCode == 200) {
// await geo.parse(response.body, verbose: true);
geo.processedFeatures.listen((fst) {
fs = fst;
});
await geo.parse(response.body, verbose:true);
return fs;
} else {
throw Exception('Failed to create album.');
}
}
}
// return fs;
// } else {
// throw Exception('Failed to create album.');
// }
// }
// }