Sub btnBookAmbulance_Click
actSearch.Initialize()
B4XPages.ShowPage("actSearch")
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Log("Create Search")
'load the layout to Root
Root.LoadLayout("search")
Dim bdwOn As BitmapDrawable
bdwOn.Initialize(LoadBitmap(File.DirAssets, "icons8-search-24.png"))
Dim sld As StateListDrawable
sld.Initialize
sld.AddState(sld.State_Enabled, bdwOn)
btnSearch.Background=sld
btnSearch2.Background=sld
''''REVERSE GEOCODING FOR PRESENT LOCATION
Dim job As HttpJob
job.Initialize("SearchHome", Me)
If B4XPages.MainPage.gmap.MyLocation.Latitude>0 Then
job.Download("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/json?latlng=" & B4XPages.MainPage.gmap.MyLocation.Latitude & "," & B4XPages.MainPage.gmap.MyLocation.Longitude & "&sensor=true&key=" & B4XPages.MainPage.ApiKey)
End If
End Sub