Click to See Complete Forum and Search --> : Using Google Maps from VB 2008


VBDavid
July 14th, 2009, 01:58 AM
Afternoon Everyone,

I hope that someone out there might be able to help me. I am creating an application that will read from a CSV file, and display that information in a DataGridView. This first part of the operation works as does the conversion from Degrees/Minutes/Seconds to Degrees decimal. Once converted the datagrid view shows:

UHF CH1 Rep -24.055 133.9783333

There are a total of 704 entries like this.

What I am having problems with is showing this position on a Google Map. My project is using the WebBrowser Control in VB 2008, but when I use the URL I get the entire google page.

URL:http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q=-24.055,133.9783333

The size of the WebBrowser control is 373, 431.

What I would like to be able to do is have the location centred in the WebBrowser control

Any help that any one can give me would be appreciated

Thanks in advance

HanneSThEGreaT
July 14th, 2009, 07:24 AM
Welcome to the forums! :wave:

The best way would be to use the Google Maps API, provided by Google. you could find more info on it here :

http://code.google.com/apis/maps/documentation/introduction.html#Loading_the_Maps_API

If you have a registered Google account.

What I once did was to create a normal Webpage to host the map, and from my program's WebBrowser, I just navigated to that file ( as shown in the attachment )

You may need a little JavaScript help to set up all the addresses properly though, but it shows what you want, and how you want it then :)

With the attached file, just unzip it, copy the Map.html file to the C:\ then run your project, and voila!

I hope my post was helpful :D

VBDavid
July 16th, 2009, 03:57 PM
Thanks HanneSThEGreaT,

Will check out the API and see if that helps. Have saved your zip file and will have a llok at that as well