Vb.net + mapping
Résolu
meskasousoubiba
Messages postés
1207
Date d'inscription
Statut
Membre
Dernière intervention
-
meskasousoubiba Messages postés 1207 Date d'inscription Statut Membre Dernière intervention -
meskasousoubiba Messages postés 1207 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Bonjour;)
je suis entrain de developper une application de geolocalisation dont voici le 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
en l'executant je trouve un problème: ça ne me permet que d'ouvrir le navigateur gmaps sur le second splitwindow, et pour rechercher, je ne peux pas utiliser mon propre moteur de recherche: en saissant un zip code ou un nom de ville ds le split 1, ça ne mène à aucune recherche, uniquement l'ouverture du google map sur lequel je dois ajouter un mot clè :(
merci pour votre aide
************** j'attends votre aide ccmiens :) *****************
*******et je vous aiderai aussi autant que je peux ;)**********
Bonjour;)
je suis entrain de developper une application de geolocalisation dont voici le 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
en l'executant je trouve un problème: ça ne me permet que d'ouvrir le navigateur gmaps sur le second splitwindow, et pour rechercher, je ne peux pas utiliser mon propre moteur de recherche: en saissant un zip code ou un nom de ville ds le split 1, ça ne mène à aucune recherche, uniquement l'ouverture du google map sur lequel je dois ajouter un mot clè :(
merci pour votre aide
************** j'attends votre aide ccmiens :) *****************
*******et je vous aiderai aussi autant que je peux ;)**********
A voir également:
- Vb.net + mapping
- Mind mapping gratuit télécharger - Télécharger - Organisation
- Vb.net express - Télécharger - Langages
- Vb.net - Télécharger - Langages
- Mapping 3d - Forum TV & Vidéo
- VB.net ou c# ? - Forum Framework .NET
2 réponses
partiellement résolu: une simple faute d'ortographe: j'ai remplacé mapps par maps et ça a marché ;)
reste le prob de géolocalisation par lattitude et longitude, problem resolved, it was just a spelling mistake: mapps which i replaced by maps ;)
j'ai remplacé decimal par string
'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
mais je ne peux toujours pas faire une recherche par coordonnées géographiques, qu'est ce que vou me proposez?
reste le prob de géolocalisation par lattitude et longitude, problem resolved, it was just a spelling mistake: mapps which i replaced by maps ;)
j'ai remplacé decimal par string
'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
mais je ne peux toujours pas faire une recherche par coordonnées géographiques, qu'est ce que vou me proposez?