Above json is what I receive in google map geocode api, actually we may want to use the date at:
"geometry"-->"location"--> both "lat" and "lng". But I don't know to get those elements with map and list function. Please help. Thank you.
Above json is what I receive in google map geocode api, actually we may want to use the date at:
"geometry"-->"location"--> both "lat" and "lng". But I don't know to get those elements with map and list function. Please help. Thank you.
Dim results As List = root.Get("results")
For Each colresults As Map In results
Dim formatted_address As String = colresults.Get("formatted_address")
Dim types As List = colresults.Get("types")
For Each coltypes As String In types
Next
Dim geometry As Map = colresults.Get("geometry")
Dim viewport As Map = geometry.Get("viewport")
Dim southwest As Map = viewport.Get("southwest")
Dim lng As Double = southwest.Get("lng")
Dim lat As Double = southwest.Get("lat")
Dim northeast As Map = viewport.Get("northeast")
Dim lng As Double = northeast.Get("lng")
Dim lat As Double = northeast.Get("lat")
Dim bounds As Map = geometry.Get("bounds")
Dim southwest As Map = bounds.Get("southwest")
Dim lng As Double = southwest.Get("lng")
Dim lat As Double = southwest.Get("lat")
Dim northeast As Map = bounds.Get("northeast")
Dim lng As Double = northeast.Get("lng")
Dim lat As Double = northeast.Get("lat")
Dim location As Map = geometry.Get("location")
Dim lng As Double = location.Get("lng")
Dim lat As Double = location.Get("lat")
Dim location_type As String = geometry.Get("location_type")
Dim address_components As List = colresults.Get("address_components")
For Each coladdress_components As Map In address_components
Dim types As List = coladdress_components.Get("types")
For Each coltypes As String In types
Next
Dim short_name As String = coladdress_components.Get("short_name")
Dim long_name As String = coladdress_components.Get("long_name")
Next
Dim place_id As String = colresults.Get("place_id")
Next
Dim status As String = root.Get("status")
For your needs you can strip it down to i think
B4X:
Dim results As List = root.Get("results")
For Each colresults As Map In results
Dim geometry As Map = colresults.Get("geometry")
Dim viewport As Map = geometry.Get("viewport")
Dim southwest As Map = viewport.Get("southwest")
Dim lng As Double = southwest.Get("lng")
Dim lat As Double = southwest.Get("lat")
Dim northeast As Map = viewport.Get("northeast")
Dim lng As Double = northeast.Get("lng")
Dim lat As Double = northeast.Get("lat")
Dim bounds As Map = geometry.Get("bounds")
Dim southwest As Map = bounds.Get("southwest")
Dim lng As Double = southwest.Get("lng")
Dim lat As Double = southwest.Get("lat")
Dim northeast As Map = bounds.Get("northeast")
Dim lng As Double = northeast.Get("lng")
Dim lat As Double = northeast.Get("lat")
Dim location As Map = geometry.Get("location")
Dim lng As Double = location.Get("lng")
Dim lat As Double = location.Get("lat")
Dim location_type As String = geometry.Get("location_type")
Next
Dim status As String = root.Get("status")