D
D
Denis Dudnik2014-10-30 17:22:20
JavaScript
Denis Dudnik, 2014-10-30 17:22:20

Write data received using geocoding to json file?

Hello, I need to use geocoding to take the coordinates and write them into a pre-prepared json, from where the values ​​​​for the markers will be taken. It seems to be possible to organize, could you tell (or give a link) how this can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sydorenko, 2014-10-30
@San40

Do you understand that for this it is easier and faster for you to make a geo-request from the server and not from the client? That is, from php and not from js, right? otherwise, you will have to write some kind of service, and from your js send data to this service in json, and use this service to save this data to the required file?
here is how to save json in php

$fp = fopen('results.json', 'w');
fwrite($fp, json_encode($response));
fclose($fp);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question