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


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

2010-12-05 Thread NopMap


Richard Fairhurst wrote:
 
 I've added it in r24590 (and uploaded a new swf to geowiki.com should 
 you want to play with it for now). You can pass in the URL using the 
 gpx_url parameter.
 

Thanks. I'd really like to play with it, but I don't understand where that
parameter is and how to call it.

bye
Nop

-- 
View this message in context: 
http://gis.638310.n2.nabble.com/On-GPX-tracks-in-P2-tp5567583p5806135.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


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

2010-12-03 Thread NopMap


Andy Allan 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.

My use case is:
- A user has a GPX track on his local drive that he wants to use for
mapping.
- To overcome the crossdomain restrictions, he uploads the file onto the
same server that is running P2 where it becomes available under a temporary
URL
- I would need a way to hand over this URL to P2 dynamically. Preferrably by
calling a method on the SWFObject when starting P2. The GPX should be loaded
from the URL and used as a background.

Currently, you need to open the Background dialog and enter the URL
manually.

Or is there another way to achieve this?

bye
 Nop

-- 
View this message in context: 
http://gis.638310.n2.nabble.com/On-GPX-tracks-in-P2-tp5567583p5801990.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