Can't zoom google maps (1 Viewer)

John Sh

Member
Local time
Today, 20:45
Joined
Feb 8, 2021
Messages
410
I know this is a bit left of field but thought someone might have had some experience with this.
The form attached opens Google maps to the required address taken from a data table.
All works well except the zoom level isn't affected by the zoom setting and the basemap always comes up as "terrain" whilst set to "satellite".
Google does give a reasonable amount of help on this matter but they do not address the zoom and basemap problem to any great degree.
The location in the table is in a remote section of the Northern Territory so the map appears to be empty.
Clicking the "Satellite" view reveals the detail.
 

Attachments

  • Google_Maps.accdb
    392 KB · Views: 77

John Sh

Member
Local time
Today, 20:45
Joined
Feb 8, 2021
Messages
410
Try this:
sURL = "https://maps.google.com/maps?t=k&q=loc:"

It's up to you to figure out the zoom. You may also want to consider building the url with the button instead of the current event.
Thank you. That's solved one of my problems.
Where did the "?t=k&q=" come from? If I remove the colon and insert my lat long it works fine.
Obviously this is just for testing purposes, the final result will be integrated into a module and called from many forms.
 

561414

Active member
Local time
Today, 05:45
Joined
May 28, 2021
Messages
280
This url appeared on a few stack overflow posts regarding your issue:
 

John Sh

Member
Local time
Today, 20:45
Joined
Feb 8, 2021
Messages
410
This url appeared on a few stack overflow posts regarding your issue:
Many thanks. There's a wealth of information there and it's much easier to implement than way Google describe it.
 

561414

Active member
Local time
Today, 05:45
Joined
May 28, 2021
Messages
280
You're welcome, I hope it keeps working for a while, that syntax appears to be an old version of how to build their URLs.
 

isladogs

MVP / VIP
Local time
Today, 11:45
Joined
Jan 14, 2017
Messages
18,225
For details on zoom and much more, see my series of articles on annotating Google maps


There are numerous examples showing what you can do
 

Users who are viewing this thread

Top Bottom