[OpenLayers-Users] Error loading (gpx) file

emmexx emmexx at tiscalinet.it
Tue Jan 5 14:04:44 EST 2010


I get a strange behaviour when I try to load a gpx file.

I use openlayers inside cakephp (a php framework).
In a page (a form) the user can draw lines, enter parameters and save
them to a database.
As an additional feature the user is allowed to import inside the map a
gpx file.
And now the strange behaviour.
When I'm entering data for the first time the gpx file loads without
problems.
When I reopen a record with some feature (I mean that the user drew some
feature on the map, saved them to a db and then loads that data to edit
them, the same way a record is managed) and try to load the same gpx
file I get an error from php.
I don't know if this is a OL problem, it seems to me that the GET call
to retrieve the file is different.
		vlayer2= new OpenLayers.Layer.GML("gps", path,
		{
				format: filetype,
				formatOptions: {
					extractAttributes: false,
					extractStyles: false,
					maxDepth: 2,
					extractTracks: true,
					extractRoutes: false,
					extractWaypoints: false
				},
 				'styleMap': styleMap,
				projection: map.displayProjection
		});


The followings are the headers as given by firebug.

The good one:
Response Headers
Date	Tue, 05 Jan 2010 18:21:34 GMT
Server	Apache/2.2.8 (Unix) DAV/2 PHP/5.2.5
Last-Modified	Tue, 27 Oct 2009 22:13:16 GMT
Etag	"3cc041-25bb1-476f1fc201700"
Accept-Ranges	bytes
Content-Length	154545
Content-Type	text/plain

Request Headers
Host	localhost
User-Agent	Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6)
Gecko/20091201 Firefox/3.5.6
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language	it,en-us;q=0.7,en;q=0.3
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	300
Connection	keep-alive
Referer	http://localhost/cakebi/bi/Segments/add
Cookie	CAKEPHP=kg49qjumd31qtm1cgobfv293a7;
CAKEPHP=093hqaf1lg6di4o1jn8pcnu8n0


The wrong one:
Response Headers
Date	Tue, 05 Jan 2010 18:43:50 GMT
Server	Apache/2.2.8 (Unix) DAV/2 PHP/5.2.5
X-Powered-By	PHP/5.2.5
p3p	CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Set-Cookie	CAKEPHP=kg49qjumd31qtm1cgobfv293a7; expires=Tue, 12 Jan 2010
18:43:50 GMT; path=/cakebi/bi
Content-Length	2466
Keep-Alive	timeout=5, max=99
Connection	Keep-Alive
Content-Type	text/html

Request Headers
Host	localhost
User-Agent	Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6)
Gecko/20091201 Firefox/3.5.6
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language	it,en-us;q=0.7,en;q=0.3
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	300
Connection	keep-alive
Referer	http://localhost/cakebi/bi/Segments/add/23
Cookie	CAKEPHP=kg49qjumd31qtm1cgobfv293a7;
CAKEPHP=093hqaf1lg6di4o1jn8pcnu8n0

Same behaviour on my development pc and on my host.

Any suggestion?

Thank you
   maxx



More information about the Users mailing list