[Chameleon] scalebar widget/ print friendly page/session

Brent Lund Brent.Lund at state.mn.us
Wed Jun 13 15:58:07 EDT 2007


Jacob, 

 

As a follow up.   

 

Using the code below, my print preview generates a session map file
which indeed shows the scale bar label to be white.   However the next
time I zoom (change extent, map layers) on the original page the
scalebar label is Black.   So there must be another place in the session
variables where the scale label color is set.

 

________________________________

From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Brent Lund
Sent: Wednesday, June 13, 2007 12:10 PM
To: Delfos, Jacob; chameleon at lists.maptools.org
Subject: RE: [Chameleon] scalebar widget/ print friendly page/session

 

 

I'm evidently missing something in reverting.   After I call CWCExecute
to generate the page, I reset the scalebar label to white, but the
initial page is not seeing this.  (It's still using the label color
kicked out by the print friendly page)

 

...

  $oApp->CWCExecute();

session_start();

$oApp->moMapSession->oMap->scalebar->label->color->setRGB(255,255,255);

$_SESSION['gszCurrentState'] = $oApp->moMapSession->saveState();

session_write_close();

...

 

 

________________________________

From: Delfos, Jacob [mailto:Jacob.Delfos at maunsell.com] 
Sent: Tuesday, June 12, 2007 6:59 PM
To: Brent Lund; chameleon at lists.maptools.org
Subject: RE: [Chameleon] scalebar widget/ print friendly page/session

 

Hi Brent,

 

Whatever you do after your widget changes the style of the scalebar gets
applied to your session in general once you use this command:

 

$_SESSION['gszCurrentState'] = $oMapSession->saveState();

 

So either avoid having to save the changes to your session, or revert
whatever it is you did as soon as your image has been produced, and then
save it again.

 

regards,

 

Jacob

 

 

	 

	
________________________________


	From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Brent Lund
	Sent: 12 June 2007 23:22
	To: chameleon at lists.maptools.org
	Subject: [Chameleon] scalebar widget/ print friendly
page/session

	I have a page where the scalebar background is non-white and the
scalebar text is white.   The user has the option to view a "Print
Friendly" page where the scalebar has black text.   The problem is after
viewing the "PF" page, the scalebar on the original page takes on the
properties of the "PF" page.   I know the session variables are being
changed - is there a way to either prevent or undo the changes?

	 

	Thanks,

	 

	Brent Lund

	 

	 

This email and any attachments are intended solely for the named
recipient and are confidential. The copying or distribution of them or
any information they contain by anyone other than the named recipient is
prohibited. If you have received this document in error, please notify
the sender and delete all copies from your computer system and destroy
all hard copies. It is the recipient's responsibility to check this
email and any attachments to this email for viruses before use.
	
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20070613/b5e725c9/attachment-0001.html


More information about the Chameleon mailing list