How it works…
In the script, you can see that the click() event of the push button with the objectName property pushButtonSearch is connected to the displayLocation method. This means that, whenever the push button is clicked, the displayLocation method will be invoked. In the displayLocation method, you access the longitude and latitude entered by the user through the two Line Edit widgets and assign them to two variables, lng and lat, respectively. A Google Maps instance is defined by passing the API key that you got on registering with Google. Invoke the search method on the Google Maps instance, passing the longitude and latitude values that were supplied by the user. The first method is invoked on the retrieved search and the first location ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access