Web Browser Control Google API Static Maps Latitude and Longitude (1 Viewer)

kyoch

Registered User.
Local time
Today, 04:16
Joined
Mar 5, 2014
Messages
58
I have a form with a web browser control, path is to Google API static map website which marks lats and longs.

This form has a subform which has multiple lats and longs which I'd like to map in the web browser control on the main form.

Any ideas?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:16
Joined
May 7, 2009
Messages
19,170
use the Current event of you subform:

dim url as string
url = "https://maps.google.com/?ll=" & [latitudeField] & "," & [longitudeField]
Me.Parent.webbrowser.object.navigate url
 

kyoch

Registered User.
Local time
Today, 04:16
Joined
Mar 5, 2014
Messages
58
Thanks for the quick response.

Run-time error 2465 "Application-defined or object-defined error" on:
Me.Parent.webbrowser.object.navigate url
 

kyoch

Registered User.
Local time
Today, 04:16
Joined
Mar 5, 2014
Messages
58
Nvm that last one got it.

Now, it's working but there's 2 things...

1. The subform is constantly refreshing and when I switch to next records, it reverts back to the first record.

2. This displays each record but not simultaneously. I didn't make that clear in the original post but I'm wondering if I can plot multiple lats and longs on the same map.
 

kyoch

Registered User.
Local time
Today, 04:16
Joined
Mar 5, 2014
Messages
58
So I deleted the subform and remade it. That solved the switching to the first record automatically but my cursor still looks like it's refreshing every second.

Still looking to be able to plot multiple records on same map on parent form.
 

kyoch

Registered User.
Local time
Today, 04:16
Joined
Mar 5, 2014
Messages
58
So while it's staying on the same record and displaying the correct lat and long on the main form, I can't select filter anything inside the subform. Anytime I try to select something in the subform it deselects itself and I can't perform any filter functions.

For some reason, the On Current event in the subform is acting funny. Any suggestions on how to simultaneously mark multiple lats and longs?
 

Users who are viewing this thread

Top Bottom