Cheapest Gas Station App

Hi,
Im trying to build an App with realtime data from the Tankerkönig API, which shows the gas station within a 5km radius, based on the current location of the user. I want the results to be shown on a map or in a listview (switch with buttons) and the cheapest should be the first result. After trying different approaches, my last
results are in the picture. Hopefully someone can help me :slight_smile:

You are asking for current latitude but longitude 0.

Do you live in Longitude 0?

P.S. an API doc link would be helpful.

Thanks for your reply, here is the ApI-Link:
https://creativecommons.tankerkoenig.de/json/list.php?lat=52.52099975265203&lng=13.43803882598877&rad=4&sort=price&type=diesel&apikey=e89e9fa6-7784-4aa6-9cc9-0a5acdadcfb5

I tried to check if latitude and longitude is there.

Yes, but you failed for longitude...


Taifun

Convert the result into a dictionary and learn how to extract values from there

Taifun

Our collection

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

Smarter_Tanken_App.aia (4.6 KB)
Here is my .aia file, thanks for your help :slight_smile:

I got it working, using advanced list blocks, and learning a little about map markers.

I had to disable the location sensor to avoid trying to display an empty station list.
(My emulator is not in Germany.)

Screen1.Initialize is wired to display a sample station list for testing.

Smarter_Tanken_App (1).aia (7.3 KB)

(added to FAQ)

Thanks for your help, but when the App starts running, I get the error:
wrong number of arguments (1 for 2). Irritants: ()
How can I fix this?
tankerkönig_new.aia (5.7 KB)

It works fine on my Bluestacks Android emulator, when I set its address to Berlin at run time while the app is running in the Companion.

Your issue must be iOS related, judging from your error message.

Unfortunately, I have no iOS device.