vigyanabikshu_1 0 Newbie Poster

Thank you very uch for your kind information

yolandre 0 Newbie Poster

Thanks a stack for a great post! This was a first for me and I was amazed at the result.

Can anyone help with how to set the coordinates during runtime?

Thanks again!

ashugguliya 0 Newbie Poster

hey,,, thanx for the code,,,,
it had been a greate help...
I just wanted to ask is there any way to intorduce the search option...
as in the one you use to search a particular address

oilwell2050 0 Newbie Poster

Nice work i must confess, mine runs. However, it displays the error message shown below whenever i click on the form. Secondly, how do i navigate through the solution to view images or satelite navigation. I would be greatly pleased if a kind response will be given to me. Thanks.

Eternal Newbie 30 Newbie Poster

Magical! Thanks!

mzcoskun 0 Newbie Poster

Why components does not work in Public Class GoogleControl ???
i.e. when I add a control (Label) to Form1 and add some code to Public Sub Map_MouseMove so then noting happens.?? Label never cvhanges??

friedcc 0 Newbie Poster

Just cannot get this to work. The form just shows the text of the GoogleMap.htm as text, not as a map. I've gone over the instructions many times now and I can't see what is wrong. ANy help?


friedcc 0 Newbie Poster

Messed with this for several hours, very frustrated, it just will not work. It just shows the contents of the GoogleMap.htm file as text, not as a map. No clue why.

hiren.patel.90834 0 Newbie Poster

Can you show mw how to add markers in the map. I do have loop of lat and lng. and also set map in center.

Cheers Harry

Albert_1 0 Newbie Poster

This is a shot in the dark as this post is a few years old but:

Have you ever encountered a JSON script error? I modified the Google JS API v3 code to create markers for each record from a SqlDataReader (working flawless) while creating an InfoWindow for each marker as well (also working flawlessly). I had it to the point where you can click different markers and have an InfoWindow for each one come up with info from that record in the database. All of a sudden when I click a marker I am getting a JSON script error. The InfoWindow very quickly opens and closes.

katsuhiro01 0 Newbie Poster

Hello, I get this error when I run the program.. I followed the steps correctly.. but I got this script error.. Do you have a tip on how to fix this?

Hoping for a reply!
Have a nice day!

Aaron_8 0 Newbie Poster

Can you help me?
I did sample a few days ago and works fine, but suddenly stop to work, just load the controls and markers but the map not.

natty_2 0 Newbie Poster

this code has been working all along my application and suddenly stopped, upon debugging it seems the program fails on Webbrowser_DocumentCompleted event when it's calling function Initialize() causing the whole application to freeze. Any idea of what has changed?

xrjf 178 Newbie Poster

Try a static variable so DocumentCompleted fires just once (I had the same problem):

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
        'Initialize the google map with the initial settings.'
        'The Initialize script function takes four parameters'
        'zoom, lat, lng, maptype.  Call the script passing the'
        'parameters in.'
        Static bInit As Boolean = False
        If bInit Then Exit Sub
        WebBrowser1.Document.InvokeScript("Initialize", New Object() {InitialZoom, InitialLatitude, InitialLongitude, CInt(InitialMapType)})
        bInit = True
    End Sub
xrjf 178 Newbie Poster

I meant to fire only one time InvokeScript(), because DocumentCompleted can be invoked multiple times Click Here

xrjf 178 Newbie Poster

If WebBrowser1_DocumentCompleted is leaved out like it was initially the other way round is to add an instruction if (map) return; at the start of Initialize() because for some reason looks like the javascript is modified, which makes the DocumentCompleted to be called again, which again invokes Initialize() and so in an infinit loop.

        function Initialize(zoomLevel,lat,lng,type){  
            //Get the type of map to start.
            //Need to convert the GoogleMapType enum
            //to an actual Google Map Type

            if(map) return;
            var MapType;

            switch (type)
            // .... 
Jorge Braga 0 Newbie Poster

I know this is old, but it's what I been using for ages in my app, but now with the new Google policies for Maps API it's stop working! I've already got a API key and it's working fine on Fiddle.
The thing is when i replace the string "<script type="text/javascript" src=""> </script>" with <script type="text/javascript" src="<MyKey>sensor=false"> </script>", still don't works...
Any ideas? Thk you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.