How do I get my current location? (and display 5 closest electric car stations)

i'm thinking of an app that , upon starting, knows where i am and automatically displays the 5 closest electric car charging stations thru an api. why am i getting [0,0] (latitude,longitude) from my location sensor?

Do not test in room. Go out to test with open area.

Reading Using the Location Sensor might help you understand how the LocationSensor works.

This can be done using the ActivityStarter. Here is an example that finds a particular store ...
How to search for nearest store - #7 by SteveJG . The code will find 'car charging stations near me' by substituting those words for 'Walmart near me' that are in the example code. :slight_smile:

Does it work for you?

Here is an api for USA vehicle charging stations Nearest Stations API | NREL: Developer Network :slight_smile:

it worked1 thanks a lot!

thanks for the tips - thats heavy reading!
that's the API i started to use! (although it didnt seem to have kwph data).
thanks a lot!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.