1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| ValKeyAPI est une chaîne = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
MaPosition est une géoPosition
MaPosition = GPSRécupèrePosition()
ResJSON est une chaîne
Res est un entier
SI MaPosition..Latitude <> 0 OU EnModeTest() ALORS
ValRequete est une chaîne = "https://maps.googleapis.com/maps/api/geocode/json?latlng=%1,%2&result_type=locality&key=%3"
SI EnModeTest() ALORS
ValRequete = ChaîneConstruit(ValRequete,48.2560957,7.43291311,ValKeyAPI)
SINON
ValRequete = ChaîneConstruit(ValRequete,MaPosition..Latitude,MaPosition..Longitude,ValKeyAPI)
FIN
//res = HTTPRequête(ValRequete,"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1","","","text/xml")
//Res = HTTPRequête(ValRequete,"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1")
Res = HTTPRequête(ValRequete)
SI res ALORS
ResJSON = HTTPDonneRésultat(httpRésultat)
Info(ResJSON)
FIN
FIN |
Partager