update initial map loading

This commit is contained in:
Mohamed Nouffer
2022-12-27 18:52:37 +05:30
parent c1f7656044
commit f8a79842e3
5 changed files with 310 additions and 25 deletions

View File

@ -76,6 +76,24 @@ class LocationService{
return null;
}
static Future<List<dynamic>?> getLocationsExt() async {
List<dynamic> ext = [];
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/locsext/';
//String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
ext = json.decode(utf8.decode(response.bodyBytes));
}
return ext;
}
static Future<GeoJsonFeatureCollection?> loadLocationsSubFor(String subperfecture, String cat) async {
final IndexController indexController = Get.find<IndexController>();