By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,898 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,898 IT Pros & Developers. It's quick & easy.

tracking application with vb.net, gm862-gps module and googlemaps

fridrai
P: 9
Hi all
I am trying to develop a tracking application by the use of python to write the script for the gm862-gps module, and .net for the desktop window application, which code is:
Expand|Select|Wrap|Line Numbers
  1. Imports System.Text
  2. Imports Microsoft.VisualBasic
  3. Imports System.Timers
  4.  
  5.  
  6.  
  7.  
  8.  
  9. Public Class Tracking_Theft
  10.  
  11. Private Sub butnsrchmap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butnsrchmap.Click
  12. Try
  13.  
  14. Dim Street As String = String.Empty
  15. Dim City As String = String.Empty
  16. Dim Zip As String = String.Empty
  17. Dim IMEI As Decimal = Decimal.Zero
  18. Dim Lattitude As Decimal = Decimal.Zero
  19. Dim Longitude As Decimal = Decimal.Zero
  20. Dim Number_Of_Satellites As Integer = Integer.MinValue
  21. Dim queryAdress As New StringBuilder()
  22. queryAdress.Append("https://maps.google.com/mapps?q=")
  23.  
  24. 'build street part query
  25. If txtstreet.text <> String.Empty Then
  26. Street = txtstreet.Text.Replace(" ", "+")
  27. queryAdress.Append(Street + "," & "+")
  28. End If
  29.  
  30. 'build city part query
  31. If cmbxcity.Text <> String.Empty Then
  32. City = cmbxcity.Text.Replace(" ", "+")
  33. queryAdress.Append(City + "," & "+")
  34. End If
  35.  
  36. 'build zip part query
  37. If txtzip.Text <> String.Empty Then
  38. Zip = txtzip.Text.Replace(" ", "+")
  39. queryAdress.Append(Zip + "," & "+")
  40. End If
  41.  
  42. 'build IMEI part query
  43. If txtimei.Text <> String.Empty Then
  44. IMEI = txtimei.Text.Replace(" ", "+")
  45. queryAdress.Append(IMEI + "," & "+")
  46. End If
  47.  
  48. 'build latitude part query
  49. If txtlatitude.Text <> String.Empty Then
  50. Lattitude = txtlatitude.Text.Replace(" ", "+")
  51. queryAdress.Append(Lattitude + "," & "+")
  52. End If
  53.  
  54. 'build longitude part query
  55. If txtlongitude.Text <> String.Empty Then
  56. Longitude = txtlongitude.Text.Replace(" ", "+")
  57. queryAdress.Append(Longitude + "," & "+")
  58. End If
  59.  
  60. 'build Number of Stellites part query
  61. If txtnumbsat.Text <> String.Empty Then
  62. Number_Of_Satellites = txtnumbsat.Text.Replace(" ", "+")
  63. queryAdress.Append(Number_Of_Satellites + "," & "+")
  64. End If
  65.  
  66. WebBrowser1.Navigate(queryAdress.ToString())
  67.  
  68.  
  69. Catch ex As Exception
  70. MessageBox.Show(ex.Message.ToString(), "Unable to load the map")
  71.  
  72. End Try
  73. End Sub
  74. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  75.  
  76. daylab.Text = " " & Now.ToShortDateString
  77. timelab.Text = "" & Now.ToShortTimeString
  78.  
  79. End Sub
  80.  
  81. End Class
while running, I can not do search by key words inserted into the text boxes of my subwindow, I find myself limited tosearch by entering keywords in the text zone of the google map area
does the fact of having used the split container as a deviding page tool, disable the relation between the text zone and the webbrowser?
thx in advance for help
Jun 6 '13 #1
Share this Question
Share on Google+
3 Replies


fridrai
P: 9
problem resolved, it was just a spelling mistake: mapps which i replaced by maps ;)
now, i still have another problem, i can find just by zip code, city and street, how should i make it workable by latitude and longitude?
i've tried to replace it by
Expand|Select|Wrap|Line Numbers
  1. 'build latitude part query 
  2. If txtlatitude.Text <> String.Empty Then 
  3. Lattitude = txtlatitude.Text.Replace(" ", "+") 
  4. queryAdress.Append(Lattitude + "," & "+") 
  5. End If
  6.  
  7.  'build longitude part query 
  8.  
  9. If txtlongitude.Text <> String.Empty Then
  10.  Longitude = txtlongitude.Text.Replace(" ", "+") 
  11. queryAdress.Append(Longitude + "," & "+") 
  12. End If 
  13.  
but it still do not find by geographical coordinates :'(
Jun 6 '13 #2

fridrai
P: 9
another punctuation mistake, no need for the comma after the the longitude, i've replaced it by:
Expand|Select|Wrap|Line Numbers
  1.  If txtlongitude.Text <> String.Empty Then
  2.  Longitude = txtlongitude.Text.Replace(" ", "+") 
  3. queryAdress.Append(Longitude  & "+") 
  4. End If 
and now it works
last question: can i get how much satellites has my gps tracker detected ?
Jun 8 '13 #3

P: 1
Hello ,

This Longitude and Lattitude code is not working for me . can someone help me?
Oct 22 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.