33 lines
888 B
Dart
33 lines
888 B
Dart
// import 'package:geojson/geojson.dart';
|
|
// import 'package:http/http.dart' as http;
|
|
|
|
// import '../utils/const.dart';
|
|
|
|
// class LocationLineService {
|
|
// static Future<GeoJsonFeature?> loadLocationLines() async {
|
|
// final geo = GeoJson();
|
|
// GeoJsonFeature? fs;
|
|
// String serverUrl = ConstValues.currentServer();
|
|
// String url = '$serverUrl/api/location_line/';
|
|
// //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;
|
|
// });
|
|
|
|
// await geo.parse(response.body, verbose: true);
|
|
|
|
// return fs;
|
|
// } else {
|
|
// throw Exception('Failed to create album.');
|
|
// }
|
|
// }
|
|
// }
|