This looks promising:I have used this, maybe France has something similar. Our state government has similar free public datasets available, eg every road speed zone in the state.
The BAN associates each address listed on the French territory (25 million addresses) with its geographic coordinates.
id;id_fantoir;numero;rep;nom_voie;code_postal;code_insee;nom_commune;code_insee_ancienne_commune;nom_ancienne_commune;x;y;lon;lat;alias;nom_ld;libelle_acheminement;nom_afnor;source_position;source_nom_voie
17002_yssy3h_00001;;1;;Route de l’Abbaye;17500;17002;Agudelle;;;429137.84;6481692.86;-0.462021;45.381192;;;AGUDELLE;ROUTE DE L ABBAYE;inconnue;inconnue
17002_yssy3h_00002;;2;;Route de l’Abbaye;17500;17002;Agudelle;;;429137.84;6481692.86;-0.462021;45.381192;;;AGUDELLE;ROUTE DE L ABBAYE;inconnue;inconnue
17002_yssy3h_00003;;3;;Route de l’Abbaye;17500;17002;Agudelle;;;429137.84;6481692.86;-0.462021;45.381192;;;AGUDELLE;ROUTE DE L ABBAYE;inconnue;inconnue
17002_yssy3h_00004;;4;;Route de l’Abbaye;17500;17002;Agudelle;;;429137.84;6481692.86;-0.462021;45.381192;;;AGUDELLE;ROUTE DE L ABBAYE;inconnue;inconnue
17002_yssy3h_00005;;5;;Route de l’Abbaye;17500;17002;Agudelle;;;429137.84;6481692.86;-0.462021;45.381192;;;AGUDELLE;ROUTE DE L ABBAYE;inconnue;inconnue
17002_yssy3h_00001_a;;1;a;Route de l’Abbaye;17500;17002;Agudelle;;;428997.37;6481342.86;-0.463618;45.377988;;;AGUDELLE;ROUTE DE L ABBAYE;arcep;inconnue
17002_yssy3h_00001_b;;1;b;Route de l’Abbaye;17500;17002;Agudelle;;;429115.9;6481667.58;-0.462287;45.380956;;;AGUDELLE;ROUTE DE L ABBAYE;arcep;inconnue
17002_auqti8_00001;;1;;Le Groizard Chemin de l’Étang;17500;17002;Agudelle;;;428191.67;6482852.96;-0.474751;45.391254;;;AGUDELLE;LE GROIZARD CHEMIN DE L ETANG;inconnue;inconnue
17002_auqti8_00003;;3;;Le Groizard Chemin de l’Étang;17500;17002;Agudelle;;;428191.67;6482852.96;-0.474751;45.391254;;;AGUDELLE;LE GROIZARD CHEMIN DE L ETANG;inconnue;inconnue
17002_auqti8_00005;;5;;Le Groizard Chemin de l’Étang;17500;17002;Agudelle;;;428191.67;6482852.96;-0.474751;45.391254;;;AGUDELLE;LE GROIZARD CHEMIN DE L ETANG;inconnue;inconnue
17002_auqti8_00007;;7;;Le Groizard Chemin de l’Étang;17500;17002;Agudelle;;;428191.67;6482852.96;-0.474751;45.391254;;;AGUDELLE;LE GROIZARD CHEMIN DE L ETANG;inconnue;inconnue
17002_vxge1k_00001;;1;;Chez Limousin;17500;17002;Agudelle;;;428560.47;6482330.39;-0.469749;45.386699;;;AGUDELLE;CHEZ LIMOUSIN;inconnue;inconnue
I have found nothing with Geolocation library.In the forum you can find everything. Using the search function will be very useful to you
[B4X] Google Geocoding REST API
This code is compatible with B4A, B4i and B4J. 1. Get an API key: https://developers.google.com/maps/documentation/geocoding/get-api-key 2. Sub PlaceToLatLon(Place As String) As ResumableSub Dim res() As Double = Array As Double(9999, 9999) Dim j As HttpJob j.Initialize("", Me)...www.b4x.com
"Geolocation" is a library created by DonManfred that I use often. https://www.b4x.com/android/forum/threads/geolocation.99710/#contentI do not understand
the code that I have indicated allows you to have the same result without library. If you have a key for Google Maps using the internet api."Geolocation" is a library created by DonManfred that I use often. https://www.b4x.com/android/forum/threads/geolocation.99710/#content
It is easy to get an adress from longitude and latitude, I search code to get longitude and latitude from an adress .
Yes, thank you, but why this code returns 9999 & 9999 and not Latitude and longitute of Israel Yodfat ? Where is the problem ?the code that I have indicated allows you to have the same result without library. If you have a key for Google Maps using the internet api.
Sub Globals
Dim API_KEY As String
API_KEY = "AIzaSyDo*************SIrU*******u5oPI"
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Wait For(PlaceToLatLon("Israel Yodfat")) Complete (ll() As Double)
If ll(0) <> 9999 Then
Log("Location: " & ll(0) & ", " & ll(1))
Else
Log("Failed to geocode.")
End If
End Sub
Sub PlaceToLatLon(Place As String) As ResumableSub
Dim res() As Double = Array As Double(9999, 9999)
Dim j As HttpJob
j.Initialize("", Me)
j.Download2("https://maps.googleapis.com/maps/api/geocode/json", Array As String("key", API_KEY, "address", Place))
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim jp As JSONParser
jp.Initialize(j.GetString)
Dim m As Map = jp.NextObject
If m.Get("status") = "OK" Then
Dim results As List = m.Get("results")
If results.Size > 0 Then
Dim first As Map = results.Get(0)
Dim geometry As Map = first.Get("geometry")
Dim location As Map = geometry.Get("location")
res(0) = location.Get("lat")
res(1) = location.Get("lng")
Log(res(0))
Log(res(1))
End If
End If
Else
Log("Error!")
End If
j.Release
Return res
End Sub
Thank you,Try Log(j.GetString) and see what is the value.
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAosZSkD*************6Wn30pais"/>
)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
)
Yes. Here My Api KeyDo you select the Key restrictions to None?
[B4X] Google Geocoding REST API
This code is compatible with B4A, B4i and B4J. 1. Get an API key: https://developers.google.com/maps/documentation/geocoding/get-api-key 2. Sub PlaceToLatLon(Place As String) As ResumableSub Dim res() As Double = Array As Double(9999, 9999) Dim j As HttpJob j.Initialize("", Me)...www.b4x.com