How to get json file from Google Maps APIs

Offers and request for collaboration between partners, developers and users worldwide. Full-time and freelance jobs, employee recruitment.

People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jul 3, 2013
Company: TRIAX

Hi all!
I use Google Maps API with web browser to get distance from 2 positions,  

How to use 1C to get data json file

Im trying to code by HTTP Service with JSON POST:

HTTP = New HTTPConnection("",,,,,True);
RequestBodyFile = GetTempFileName();
ResourceLink = "maps/api/distancematrix/json?units=metric&origins=Cầu Giấy, Hà Nội, Việt Nam&destinations=Từ Sơn, Bắc Ninh, Việt Nam&key=AIzaSyA8u0Rb8vCXPrPkfVCVkhu763ms-Ne2wa8"
FileResult = GetTempFileName();
RequestHeaderHTTP = New Map();
AnswerFile = New TextDocument;
AnswerFile.Read(FileResult, TextEncoding.UTF8);
ServerResponseLine = AnswerFile.GetText();
ReaderJSON = New JSONReader;
StructureArray = ReadJSON(ReaderJSON);
If StructureArray.status = "OK" AND StructureArray.rows[0].elements[0].status = "OK" Then
 distance = StructureArray.rows[0].elements[0].distance.value/1000;

Please give me an example

People who like this:0Yes/0No
Rating: 17
Joined: Dec 4, 2017

Dear Hoang Minh Tri,

Am I right that according to How to use json to get distance 2 positon from Google Maps APIs, you have already found a working example?

Best regards,
Vladimir Gurov

1C Company support team
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.