I had same problem, i reconnect Wifi and Geocoder doesn't work.
While i do more test with Geocoder, to get Latitude / Longitude from Address
i changed code to do call google web page, sending address by httpjob and parse
web result to get latitude and longitude:
<code>
Sub Class_Globals
../..
Dim job2 As HttpJob
../..
End Sub
Sub AskGoogle(AddressSearch
As String)
Dim WebURL
As String =""
WebURL = "
http://maps.google.com/maps?q="
WebURL = WebURL & AddressSearch.Trim.Replace (" ", "%20")
job2.Initialize( "Job_GetLatLng", Me)
Try
job2.PostString(WebURL,"")
Catch
ToastMessageShow("Error: " & job2.ErrorMessage ,True)
End Try
End Sub
Sub JobDone (job
As HttpJob)
Dim ResultGoogle As String=""
Dim StartData As Int =0
Dim DataLatLng As String =""
Dim res() As String
If job.Success =
True Then
Select job.JobName
Case "Job_GetLatLng"
ResultGoogle = job.GetString
ResultGoogle=ResultGoogle.ToLowerCase
StartData = ResultGoogle.IndexOf ("{center:{lat:") + 9
If StartData > 2 Then
ResultGoogle=ResultGoogle.SubString(StartData)
DataLatLng = ResultGoogle.indexof("},")
ResultGoogle = ResultGoogle.SubString2 ( 0,DataLatLng)
ResultGoogle=ResultGoogle.Replace ("lat:","")
ResultGoogle=ResultGoogle.Replace ("lng:","")
End If
End Select
End If
Try
job.Release
Catch
Log(LastException.Message)
End Try
' ToastMessageShow(ResultGoogle,True)
CenterLonLat.Lat="41.52368"
CenterLonLat.Lng ="2.03637"
res=Regex.Split (",",ResultGoogle )
If res.Length >0 Then
If res.Length >1 Then
ToastMessageShow("Lat:" & res(0) & ",Lng:" & res(1),true)
End If
End If
End Sub
</code>