Sub btnSearch_Click
If txtClue.Text = "" Then Return
clue = txtClue.Text.Replace(" ","%20")
Dim j As HttpJob
j.Initialize("", Me)
Dim URL As String = "https://maps.googleapis.com/maps/api/place/textsearch/json"
Dim Query As String = "?query=" & clue & "&key=" & APIkey
j.Download(URL & Query)
Wait For (j) JobDone (j As HttpJob)
If j.Success Then
Dim parser As JSONParser
parser.Initialize(j.GetString)
Dim root As Map = parser.NextObject
Dim results As List = root.Get("results")
Dim colres As Map = results.Get(0)
Dim geometry As Map = colres.Get("geometry")
Dim location As Map = geometry.Get("location")
Dim Lat,Lon As Double
Lat = location.Get("lat")
Lon = location.Get("lng")
Dim cp As CameraPosition
cp.Initialize(Lat, Lon, 17)
gMap.MoveCamera(cp)
End If
j.Release
End Sub