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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fridrai
    New Member
    • Jun 2013
    • 9

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

    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:
    Code:
    Imports System.Text
    Imports Microsoft.VisualBasic
    Imports System.Timers
    
    
    
    
    
    Public Class Tracking_Theft
    
    Private Sub butnsrchmap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butnsrchmap.Click
    Try
    
    Dim Street As String = String.Empty
    Dim City As String = String.Empty
    Dim Zip As String = String.Empty
    Dim IMEI As Decimal = Decimal.Zero
    Dim Lattitude As Decimal = Decimal.Zero
    Dim Longitude As Decimal = Decimal.Zero
    Dim Number_Of_Satellites As Integer = Integer.MinValue
    Dim queryAdress As New StringBuilder()
    queryAdress.Append("https://maps.google.com/mapps?q=")
    
    'build street part query
    If txtstreet.text <> String.Empty Then
    Street = txtstreet.Text.Replace(" ", "+")
    queryAdress.Append(Street + "," & "+")
    End If
    
    'build city part query
    If cmbxcity.Text <> String.Empty Then
    City = cmbxcity.Text.Replace(" ", "+")
    queryAdress.Append(City + "," & "+")
    End If
    
    'build zip part query
    If txtzip.Text <> String.Empty Then
    Zip = txtzip.Text.Replace(" ", "+")
    queryAdress.Append(Zip + "," & "+")
    End If
    
    'build IMEI part query
    If txtimei.Text <> String.Empty Then
    IMEI = txtimei.Text.Replace(" ", "+")
    queryAdress.Append(IMEI + "," & "+")
    End If
    
    'build latitude part query
    If txtlatitude.Text <> String.Empty Then
    Lattitude = txtlatitude.Text.Replace(" ", "+")
    queryAdress.Append(Lattitude + "," & "+")
    End If
    
    'build longitude part query
    If txtlongitude.Text <> String.Empty Then
    Longitude = txtlongitude.Text.Replace(" ", "+")
    queryAdress.Append(Longitude + "," & "+")
    End If
    
    'build Number of Stellites part query
    If txtnumbsat.Text <> String.Empty Then
    Number_Of_Satellites = txtnumbsat.Text.Replace(" ", "+")
    queryAdress.Append(Number_Of_Satellites + "," & "+")
    End If
    
    WebBrowser1.Navigate(queryAdress.ToString())
    
    
    Catch ex As Exception
    MessageBox.Show(ex.Message.ToString(), "Unable to load the map")
    
    End Try
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    
    daylab.Text = " " & Now.ToShortDateString
    timelab.Text = "" & Now.ToShortTimeString
    
    End Sub
    
    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
  • fridrai
    New Member
    • Jun 2013
    • 9

    #2
    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
    Code:
    'build latitude part query 
    If txtlatitude.Text <> String.Empty Then 
    Lattitude = txtlatitude.Text.Replace(" ", "+") 
    queryAdress.Append(Lattitude + "," & "+") 
    End If
    
     'build longitude part query 
    
    If txtlongitude.Text <> String.Empty Then
     Longitude = txtlongitude.Text.Replace(" ", "+") 
    queryAdress.Append(Longitude + "," & "+") 
    End If
    but it still do not find by geographical coordinates :'(

    Comment

    • fridrai
      New Member
      • Jun 2013
      • 9

      #3
      another punctuation mistake, no need for the comma after the the longitude, i've replaced it by:
      Code:
       If txtlongitude.Text <> String.Empty Then
       Longitude = txtlongitude.Text.Replace(" ", "+") 
      queryAdress.Append(Longitude  & "+") 
      End If
      and now it works
      last question: can i get how much satellites has my gps tracker detected ?

      Comment

      • KDMN
        New Member
        • Oct 2014
        • 1

        #4
        Hello ,

        This Longitude and Lattitude code is not working for me . can someone help me?

        Comment

        Working...