googel map routs to near gasstation
This commit is contained in:
@@ -7,8 +7,10 @@ class EControlService {
|
||||
double longitude,
|
||||
String fuelType,
|
||||
) async {
|
||||
String apiUrl =
|
||||
'https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=$latitude&longitude=$longitude&fuelType=$fuelType&includeClosed=false';
|
||||
// For Test purposes only - later deactivate
|
||||
// latitude = 47.938783246743355;
|
||||
// longitude = 13.762770926423814;
|
||||
String apiUrl = 'https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=$latitude&longitude=$longitude&fuelType=$fuelType&includeClosed=false';
|
||||
var response = await http.get(Uri.parse(apiUrl));
|
||||
if (response.statusCode == 200) {
|
||||
return jsonDecode(response.body);
|
||||
@@ -21,6 +23,9 @@ class EControlService {
|
||||
double latitude,
|
||||
double longitude,
|
||||
) async {
|
||||
// For Test purposes only - later deactivate
|
||||
// latitude = 47.938783246743355;
|
||||
// longitude = 13.762770926423814;
|
||||
final results = await Future.wait([
|
||||
getEControlData(latitude, longitude, 'DIE'),
|
||||
getEControlData(latitude, longitude, 'SUP'),
|
||||
|
||||
Reference in New Issue
Block a user