Files
rog_app/lib/services/location_polygon_service.dart

35 lines
872 B
Dart
Raw Normal View History

2022-03-14 12:28:57 +05:30
import 'package:http/http.dart' as http;
2022-06-14 14:37:59 +05:30
import '../utils/const.dart';
2022-03-14 12:28:57 +05:30
class LocationPolygonervice{
2022-07-30 20:42:44 +05:30
// static Future<GeoJsonFeature?> loadLocationLines() async {
// final geo = GeoJson();
// GeoJsonFeature? fs;
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// String server_url = ConstValues.currentServer();
// String url = '${server_url}/api/location_polygon/';
// //String url = 'http://localhost:8100/api/location_polygon/';
// final response = await http.get(Uri.parse(url),
// headers: <String, String>{
// 'Content-Type': 'application/json; charset=UTF-8',
// },
// );
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// if (response.statusCode == 200) {
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// geo.processedFeatures.listen((fst) {
// fs = fst;
// });
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// await geo.parse(response.body, verbose:true);
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// return fs;
2022-03-14 12:28:57 +05:30
2022-07-30 20:42:44 +05:30
// } else {
// throw Exception('Failed to create album.');
// }
// }
2022-03-14 12:28:57 +05:30
}