I am using PyQt5 to create a small app. At some point I need to let the user select latitude and longitude from a map. After some research, the easiest way to implement a map search seems to be using google maps through some Javascript lines. I found this code that does pretty much what I need:
However, I need to use in my python function the coordinates selected by the user. How can I pass to python the latitude and longitude selected in the Javaascript code ("latLng")? I read a bunch of similar questions on many forums but I can't figure out how to solve my problem. I would expect to find a very simple solution. My code is something like:
def latlong_function():
html='''
<html> <head> .... ....
'''
print(coordinates)
return html