I’m kind of newbie in javascript so I’m looking for some help to create a way to drag and drop geocoding markers, to allow interactive changing addresses. I believe this is possible by updating the LOCATION column rows.
The first step to do it is ‘sending’ a POST request, right? Well, so I would like to ask if somebody can show me an example, because I don’t make any idea how to write and put this POST request in my code!
You must POST to the Fusion Tables API to update a column, but currently you can’t do this directly from JavaScript as Google does not set the CORS headers to allow cross-domain posting to their API.
So if you want to do this, you have to “relay” your request through your webserver or something similar. I do it with the following PHP script, then I post the request via JavaScript to my PHP script. And finally, you have to authenticate yourself using OAuth.
And in class PostRelay the method
relay()is defined, the$_POSTholds all posted data (represented by$this->datain my class):