0

I'm pretty new to Javascript, but I want to create a simple app. It must show the name of the closest gas station when a button is clicked. It also must print it using document.write().

I have been looking at the documentation that Google has provided and I am confused about how to use rankBy.DISTANCE routine.

Any help would be appreciated. Thanks!

jon hanson
  • 8,722
  • 2
  • 37
  • 61

1 Answers1

0

Get the longitude and latitude of your location through javascript. According to it check whether is there any gas station available within your preferred area. You can get the javascript api from Link is here

To use rank by closest distance see this

Community
  • 1
  • 1
I-Kod
  • 199
  • 1
  • 11