On Sat, Dec 4, 2010 at 12:32 PM, NopMap ekkeh...@gmx.de wrote:
You can set 1 or more GPX files to be loaded at startup using the
vectors.xml config file, if that's what you're meaning:
Not really. That file obviously is global for all users.
In theory you could create it dynamically - in other words, depending
what login cookies are set, use a CGI or PHP (or whatever) script to
create vector.xml with the user's desired tracks in.
Yes, but then it would still be a superset of all currently available user
GPX tracks - or is there a way to dynamically assign various vector_.xml
files to individual P2 instances when starting them?
I think you're missing what we're trying to explain. I'm assuming your
website supports sessions via cookies, or HTTP Basic auth, or some
other way - that would be needed to handle uploading GPX files to the
server in the first place. Given that then you can serve different
vectors.xml files to different people, in the same way that you serve
different html pages to different people. P2 requests its files via
the browser (that's how plugins work) so you would do something along
the lines of
* Get a request for vectors.xml
* Check the session information for that request, and figure out which
user is making it
* Figure out which GPX files are wanted for that user
* Build an XML object in memory
* Return that to the user as vectors.xml
It's very similar to what happens with the api/0.6/user/gpx_files call
which we use for the MyGPX dialog - there's nothing user-specific in
the URL, but each time it's called it returns a different list of GPX
files depending on who's authenticated for that call.
Cheers,
Andy
___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev