Results 1 to 11 of 11
  1. #1
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16

    Google Maps in webbrowser control

    I have a large Access table with latitudes and longitudes of places.



    I'm trying to get a Google map working (properly) in a webbrowser control.

    I have no problem getting the lats and longs to create a map, but placing the result centrally on the control, and without all the Google stuff around the edges has me a bit puzzled.

    In the setup table, I can readily quote all the GM variables, such as zoom and language. But it would probably look better if the map showed in an iframe type look.

    Has anyone solved this? I've Googled the web end to end....

    Paul

  2. #2
    Estuardo's Avatar
    Estuardo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Portugal
    Posts
    22
    G'd morning Paul,
    I guess we're out of look here, gmaps is for the web period. The workaround could be to create your own html page, add the google iframe and dinamically change the location to display. Then you can open your browser control with that page.
    All what you need to change in that string are the sll and sspn values and the text to display for those coordinates.
    G'd luck
    Last edited by Estuardo; 04-22-2013 at 05:22 AM. Reason: spelling :(

  3. #3
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16
    Thanks, Estuardo. I can open the Google map page OK (and Bing, if I want) but I need a medium window, and all I get to see is the top left corner of the GM page. The edit dialog is quite easy to figure....and I'm trying to paste in a screenshot of my edit environment (but don't seem able to)...

  4. #4
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16
    Click image for larger version. 

Name:	WebBrowser.jpg 
Views:	97 
Size:	63.7 KB 
ID:	12000

    Ah, got it. As you can see, it is possible to include all the GM variables in the second column.

  5. #5
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16
    I have figured a solution.
    http://maps.google.com/maps?q=[...]&ll=[...]&t=m&z=15&output=embed&iwloc=0
    To explain: in my case I have a field for latitude and another for longitude. So the bits in both the square brackets looks like [latitude]&","&[longitude]
    So, in the Parameters, you enter everything after the ?, one parameter to a line.
    Paul (and how do you start a new line in this editing panel?)

  6. #6
    dansmm is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    1

    Still getting errors

    Quote Originally Posted by bfc View Post
    I have figured a solution.
    http://maps.google.com/maps?q=[...]&ll=[...]&t=m&z=15&output=embed&iwloc=0
    To explain: in my case I have a field for latitude and another for longitude. So the bits in both the square brackets looks like [latitude]&","&[longitude]
    So, in the Parameters, you enter everything after the ?, one parameter to a line.
    Paul (and how do you start a new line in this editing panel?)
    Hi Paul,

    I am trying to do exactly the same thing and have tried to follow your method, although I can't seem to figure it out. Are you able to provide more details of how you managed to achieve this? The screenshot you uploaded makes sense although not all information is displayed and it is difficult to see where all the parameters fit in to the address along the bottom.

    Any further examples you are able to give would be very helpful.

    Thanks
    Dan

  7. #7
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16
    Hi Dan

    After a time away from MS Access, the person I did the original work for has notified me that the mapping (as above) no longer works. This may be what you are experiencing...

    So I went looking for a solution. I've not found one. There seems to have been some change in the MS/Google relationship that just produces a script error on top of a map.

    There is a MS page at http://office.microsoft.com/en-us/ac...239.aspx?CTT=1 (this is for Access 2013, but the 2010 page is identical). That process does not work - you still get the scripting error.

    Another potential problem can be found in relation to the web browser version. It is described at http://www.devhut.net/2013/10/18/web...ripting-error/ but even after I modified the registry, I got the same errors.

    I'm sorry to write all this negative stuff, but I'm looking around for a solution. If anyone has one, please post it here.

    Paul

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    You may get some info from the email exchange and samples here.

  9. #9
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16

    Angry No joy...

    Thanks for the reference, but no luck there.

    What really annoys me is that my syntax in the field generates a perfectly usable URL - see the diagram.

    Click image for larger version. 

Name:	browser_url.jpg 
Views:	44 
Size:	33.3 KB 
ID:	17942

    If you skim that (simple) URL, it will work perfectly.

    I could resort to code, but as this has worked ok before, I guess I expect it to work again! :-(

    Paul

  10. #10
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16
    Ooops. There is a cursor bar at the end of the URL in that diagram. Sorry...

    Paul

  11. #11
    bfc is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Location
    Australia
    Posts
    16

    Red face A possible solution

    Well, this might be the answer.

    I went to https://developers.google.com/maps/d...ion/imageapis/ and, a dozen lines down, there was a HTML line that I copied. I chopped off everythnig before the "http" and everythnig after the last zero. I then pasted that into the Access webbrowser dialog, then pressed Tab.

    I got this result - to explain, the field [where] is calculated by concatenating the individual lats and longs (it was just to save me typing!)

    This was the result, and it worked:

    Click image for larger version. 

Name:	browser_url2.jpg 
Views:	51 
Size:	55.5 KB 
ID:	17943

    It needs more detail - marker, pegman etc etc. But at least I can now see the maps!

    Paul

Please reply to this thread with any new information or opinions.

Similar Threads

  1. sizing a url within a webbrowser control
    By Kirsti in forum Programming
    Replies: 4
    Last Post: 11-06-2012, 06:10 PM
  2. using google maps address into a text field
    By thanosgr in forum Programming
    Replies: 5
    Last Post: 04-26-2012, 03:39 PM
  3. Floor Maps
    By neo651 in forum Access
    Replies: 1
    Last Post: 11-09-2011, 06:31 PM
  4. Landscape Orientation-WebBrowser Control
    By mwolfod in forum Forms
    Replies: 0
    Last Post: 04-11-2011, 08:32 AM
  5. Radio Button Select in WebBrowser
    By access_man in forum Access
    Replies: 3
    Last Post: 10-27-2010, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums