Re: Turning from flat files to MySQL
"It's just a bit weird that everyone seems to be answering questions
that I
haven't asked, and are missing the one that I do need help with."
The problem is, you're asking the wrong question :-)
You don't need to change your javascript code at all (well, hardly at
all). It doesn't care whether the gpx file it processes is a flat file,
comes from a database, or is keyed in on demand by a team of magic
elves. All it knows is that it requests a URL and gets a gpx file
returned to it.
So all you need to change is the URL that you request - it used to
point to a flat file somewhere on your site, it'll now have to point to
some kind of server-side script that extracts the file you want and
returns it. That's why the answers you've received have concentrated on
the server-side - that's where all the work is.
Frankly, I do see any particular benefit in using a database, if it's
only going to behave as a directory of big XML files. The database
approach only really becomes worthwhile if you can call a script with,
say, top/bottom/left/right parameters which dynamically generates a
file listing only features located inside those limits.
0 Comments:
Yorum Gönder
<< Home