update
This commit is contained in:
@ -8,7 +8,6 @@ class LocationService{
|
||||
static Future<GeoJsonFeatureCollection?> loadLocations() async {
|
||||
final geo = GeoJson();
|
||||
GeoJsonFeatureCollection? fs;
|
||||
print("#### feature collection ####");
|
||||
String url = 'http://localhost:8100/api/location/';
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -22,4 +21,22 @@ class LocationService{
|
||||
}
|
||||
}
|
||||
|
||||
static Future<GeoJsonFeatureCollection?> loadLocationsFor(String perfecture) async {
|
||||
final geo = GeoJson();
|
||||
GeoJsonFeatureCollection? fs;
|
||||
String url = 'http://localhost:8100/api/inperf/?perf=' + perfecture;
|
||||
final response = await http.get(Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
GeoJsonFeatureCollection cc = await featuresFromGeoJson(utf8.decode(response.bodyBytes));
|
||||
return cc; //featuresFromGeoJson(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user