Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project: Google map
#1
The point of the project is to type any address and after "enter" to automatically be redirected to google map with that location on the map. When I run this code it writes the address in search box in google maps but there is no change on the map, it still gives me my own location. Not sure why is this so, any idea is appreciated.
#! python3
# mapIt1.py - Launches a map in the browser using an address from the
# command line or clipboard.

import webbrowser, sys, pyperclip

def my_func(get_add):
    if len(client) > 1:
	    # Get address from command line
	    address = ' '.join(get_add)
    else:
	    # Get address from clipboard
	    address = pyperclip.paste()

    webbrowser.open('https://www.google.com/maps/place/' + address)
	
def test_it(args):
	print(args)
	my_func(args)

if __name__ == '__main__':
	client = input("Hi! Please add any address you want to see on map: ")
	test_it(client)
	
Reply


Messages In This Thread
Project: Google map - by Truman - Jul-30-2018, 10:08 PM
RE: Project: Google map - by Zombie_Programming - Jul-31-2018, 06:39 AM
RE: Project: Google map - by Truman - Jul-31-2018, 09:52 PM
RE: Project: Google map - by Vysero - Jul-31-2018, 03:37 PM
RE: Project: Google map - by Vysero - Jul-31-2018, 10:16 PM
RE: Project: Google map - by Truman - Aug-01-2018, 10:09 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020