I am creating a database application using VB.net and MSSQL 2012. I have retrieved a list of customer from the database and want to plot them on google map. At it stands, I can only plot the first customer. Below is my code. Can someone help me out as this has been killing me for some times now.
Dim lat As String = String.Empty Dim lon As String = String.Empty
Dim queryAddress As New StringBuilder() queryAddress.Append("http://maps.google.com/maps?q=") For i = 0 To Me.DataGridView1.RowCount - 1 If Me.DataGridView1.Rows(i).Cells(0).Value String.Empty Then lat = Me.DataGridView1.Rows(i).Cells(0).Value queryAddress.Append(lat + "%2C") End If If Me.DataGridView1.Rows(i).Cells(1).Value String.Empty Then lon = Me.DataGridView1.Rows(i).Cells(1).Value queryAddress.Append(lon) End If WebBrowser1.Navigate(queryAddress.ToString()) Next
أكثر...
Dim lat As String = String.Empty Dim lon As String = String.Empty
Dim queryAddress As New StringBuilder() queryAddress.Append("http://maps.google.com/maps?q=") For i = 0 To Me.DataGridView1.RowCount - 1 If Me.DataGridView1.Rows(i).Cells(0).Value String.Empty Then lat = Me.DataGridView1.Rows(i).Cells(0).Value queryAddress.Append(lat + "%2C") End If If Me.DataGridView1.Rows(i).Cells(1).Value String.Empty Then lon = Me.DataGridView1.Rows(i).Cells(1).Value queryAddress.Append(lon) End If WebBrowser1.Navigate(queryAddress.ToString()) Next
أكثر...