Sub abwifi1_FoundLocation()
Dim ResLocation As ABFoundLocation
ResLocation =abwifi1.ABGetFoundLocation()
mod1.latx = ResLocation.Latitude
mod1.longx = ResLocation.Longitude
HttpUtils.CallbackActivity = "Map"
HttpUtils.CallbackJobDoneSub = "JobDone"
mod1.gecodex = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?"
Dim report As String
report="location="& mod1.latx &","&mod1.longx&"&radius=5000&types=police&sensor=True&key=AIzaSyC83Ko8-MHYaxTqtDrNIsdExuPZ9bVRZnM"
HttpUtils.PostString("Job1",mod1.gecodex,report)
'urlx ="geo:"&mod1.latx &","&mod1.longx &"?q=police&radius=5000"'
End Sub
Sub JobDone (Job As String)
If HttpUtils.IsSuccess(mod1.gecodex ) Then
Dim parser As JSONParser
Dim response As String
Dim Map1 As Map
response = HttpUtils.GetString(mod1.gecodex )
parser.Initialize(response)
Dim rows As List
rows = parser.NextArray
'work with result
'rows is a List. Each item is a Map with the columns names as keys and the db values as the values.
If rows.Size <> 0 Then
For i = 0 To rows.Size - 1
Dim m As Map
m = rows.Get(i)
Next
End If
End If
ProgressDialogHide
HttpUtils.Complete = False
End Sub