Re: [Potlatch-dev] On GPX tracks in P2

2010-12-06 Thread Andy Allan
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


Re: [Potlatch-dev] On GPX tracks in P2

2010-12-06 Thread NopMap

Hi!


Andy Allan wrote:
 
 The vectors.xml, imagery.xml and stylesheets.xml files are all
 requested at initialisation, so you could (if you had a need) provide
 custom per-user versions of any of them.
 
 The myGPX dialog (which is practically unfindable now) talks only to
 the same OSM server that's configured in the api variable, since
 it's using OSM API calls to access the tracks that have already been
 uploaded to the API server.
 

So where would I find the contents of vector.xml in P2?

bye
  Nop

-- 
View this message in context: 
http://gis.638310.n2.nabble.com/On-GPX-tracks-in-P2-tp5567583p5809150.html
Sent from the Potlatch mailing list archive at Nabble.com.

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev