I am having a very specific problem, so I hope someone can help. I am creating a CakePHP map application. I'm currently trying to import some data into my application for manipulation, I have a google docs CSV file (I also have a local version), and I also use a custom js library. So, I have an ad that looks like this:
mapbox.markers.layer().csv('csvstring');
csvstring matches the standard string of CSV data, I looked at some examples on the mapbox website, but all had hardcoded data, for example. csvstring = 'lat,lon\n,0,0';
Is there an easy way to read either a google document, or read a file from my CakePHP directory in a string variable or, if not, an array? I tried the internet for several days and could not find a solution. If it can be allowed by PHP to do the dirty work and then pass the string to js var, that would be great too. In the end, it should be a string or an array of strings.
I saw a lot of people recommending getting to know the Google Docs API, but in fact, I am nooby with both CakePHP and javascript, and it took a lot of work to go this far, my head is full and I just I don’t think I can have another big reading session, time is running out on my project. Also, don’t assume that I know ANYTHING, the complete response of idiots would be greatly appreciated, thanks in advance.
source
share