1

Does anyone know how to get latitude and longitude of an intersection of 2 roads given 2 roads address by and Map API like Google map API?

I currently find a solution for Python such as from geopy.

Thank you!

Rarblack
  • 4,559
  • 4
  • 22
  • 33
Ngoc Cao
  • 11
  • 2
  • Potential duplicate of https://stackoverflow.com/questions/10676790/getting-an-intersection-with-google-places-geocoding-api ? – JLuxton Oct 04 '18 at 06:51

1 Answers1

-1
def loc(streetA, streetB):
    res = requests.get('https://www.google.com/maps/place/'+streetA+' & '+streetB)
    return re.findall(r'll=(.*?)" item', res.text)[0].split(',')

gps = loc('19th rd nw', 'kafir rd')
print(gps)
>>['38.302811', '-95.767682']

Its not an api but you can always just scrape google maps? Here is a function I threw together that takes two strings representing the roads that intersect.

Sluts
  • 1
  • 3