I'm developing a windows mobile application using VB.net, I set my map
showing in a VB "PictureBox". I use VB "WebRequest" and "WebResponse"
class to get the static map from Google. The predefined "qAddress" is
a "StringWriter" to store the address of static map.

My problem is,  I can see the correct map at first time querying, but
when I change the latitude or longitude of querying and query again
within 90 seconds since last query, the "WebResponse" seems to hung up
and will return a "Response timed out" error after a long time wating.
If I update the static map longer than 90 seconds later, every thing
looks fine. Is there a limit or am I wrong at some point?

Any help many thnks!!

P.S. My web request is looks like fowllwing code:(just a part of my
program)

        Dim bmp As Bitmap = New Bitmap(defaultMap)
        Dim wr As WebRequest
        Dim res As WebResponse

        Cursor.Current = Cursors.WaitCursor

        If qAddress.ToString() <> lastReq Then
            Try
                wr = WebRequest.Create(qAddress.ToString())
            Catch ex As Exception
                MessageBox.Show(ex.Message.ToString(), "Error")
                Return False
            End Try

            lastReq = qAddress.ToString()

            Try
                res = wr.GetResponse()
            Catch ex As Exception
                MessageBox.Show(ex.Message.ToString(), "Error")
                Return False
            End Try

            Try
                bmp = New Bitmap(res.GetResponseStream)
            Catch ex As Exception
                MessageBox.Show(ex.Message.ToString(), "Error")
                Return False
            End Try
        Else
            Return True
        End If
        PictureBox1.Image = bmp.Clone()
        bmp.Dispose()

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to