Get the GPS location, then try using an online service to get the road name information that you're looking for. I presume that there's a service that will do that for you.
Geocoder.GetFromLocation(point.Lat,point.Lon,2, Null)
...
End Sub
Sub Geocoder_GeocodeDone(Results() As Address, Tag As Object)
If Results.Length>0 Then
Dim Address1 As Address
Address1=Results(0)
If Address1.AddressLines.Size>0 Then
For j = 0 To Address1.AddressLines.Size-1
place = place & " " & Address1.AddressLines.Get(j) & " "
Next
End If
End If
display_parameter = place
End Sub
Geocoder.GetFromLocation(point.Lat,point.Lon,2, Null)
...
End Sub
Sub Geocoder_GeocodeDone(Results() As Address, Tag As Object)
If Results.Length>0 Then
Dim Address1 As Address
Address1=Results(0)
If Address1.AddressLines.Size>0 Then
For j = 0 To Address1.AddressLines.Size-1
place = place & " " & Address1.AddressLines.Get(j) & " "
Next
End If
End If
display_parameter = place
End Sub
i guess NO. Google Maps, and also other map solutions, presents you images... Depending on the zoomlevel they are more clear and detailed (showing streetnames). But they are just images. Google does not expose Streetnames in the api.
Thank you all for your attention
but I honestly do not understand how to use the library Geocoder.
I simply need to obtain the address and read it into a label.
Library gps I always use it to get lat and long right?
B4X:
Sub GPS_LocationChanged (Location1 As Location)
lon1 =Location1.Latitude
long2 =Location1.Longitude
Label1.Text="Latitude: "&lon1
Label2.Text="Longitude: "&long2
Label4.Text=geo.GetFromLocation(long2,lon1,2,Null)
End Sub
Sub Geocoder_GeocodeDone(Results() As Address, Tag As Object)
If Results.Length>0 Then
Dim Address1 As Address
Address1=Results(0)
If Address1.AddressLines.Size>0 Then
For j = 0 To Address1.AddressLines.Size-1
place = place & " " & Address1.AddressLines.Get(j) & " "
Next
End If
End If
End Sub
I see nothing in the label, but it is correct to put a NULL?
B4X:
Sub GPS_LocationChanged (Location1 As Location)
lon1 =Location1.Latitude
long2 =Location1.Longitude
Label1.Text="Latitude: "&lon1
Label2.Text="Longitude: "&long2
geo.GetFromLocation(long2,lon1,2,Null)
End Sub
Sub Geocoder_GeocodeDone(Results() As Address, Tag As Object)
If Results.Length>0 Then
Dim Address1 As Address
Address1=Results(0)
If Address1.AddressLines.Size>0 Then
For j = 0 To Address1.AddressLines.Size-1
place = place & " " & Address1.AddressLines.Get(j) & " "
Next
End If
End If
Label4.Text = place
End Sub