[mapserver-users] Filename

Puneet Kishor pkishor@GeoAnalytics.com
Thu, 9 May 2002 16:57:13 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1F7A4.799C7B00
Content-Type: text/plain;
	charset="iso-8859-1"

very easy to do with Perl/Mapscript. It might be hardcoded into the
PHP/Mapscript methods.
 
here's how in Perl
 
my $appurl = "url/to/my/app/";
my $tmpdir = "path/to/my/tmp/";
my $mapimgname = $whateveriwant . time() . ".png";  # time() makes it
unique, .png adds the extension
my $imgObj = $mapObj->draw();
mapscript::msSaveImage($imgObj, $tmpdir . $mapimgname, 2,
$mapObj->{interlace}, $mapObj->{transparent}, 95); 
my $mapurl = $appurl . "tmp/" . $mapimgname;
 
pk/

-----Original Message-----
From: Jason Spangler [mailto:JasonS@cassco.org]
Sent: Thursday, May 09, 2002 3:56 PM
To: mapserver-users@lists.gis.umn.edu
Subject: [mapserver-users] Filename


I'm sure I'm overlooking something, but is it possible to change the name of
the tmp map image file name?
 
I would like to add different variables to the beginning of the filename at
different times of the day.
 
Any help would be appreciated.
 
Thanks,
Jason
 
 
 
 
 
Jason Spangler
Cass County Information Systems
616-445-4489
jasons@cassco.org <mailto:jasons@cassco.org> 
 
 


------_=_NextPart_001_01C1F7A4.799C7B00
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2713.1100" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><SPAN class=362505121-09052002><FONT size=1>very easy to do with 
Perl/Mapscript. It might be hardcoded into the PHP/Mapscript 
methods.</FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1>here's how in 
Perl</FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1>my $appurl = 
"url/to/my/app/";</FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1>my $tmpdir = 
"path/to/my/tmp/";</FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1>my $mapimgname = $whateveriwant 
. time() . ".png";&nbsp; # time() makes it unique, .png adds the 
extension</FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><FONT size=1>my $imgObj = 
$mapObj-&gt;draw();<BR>mapscript::msSaveImage($imgObj, $tmpdir . $mapimgname, 2, 
$mapObj-&gt;{interlace}, $mapObj-&gt;{transparent}, 95); </FONT></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><SPAN class=362505121-09052002><FONT 
size=1>my $mapurl = $appurl . "tmp/" . $mapimgname;</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=362505121-09052002><SPAN class=362505121-09052002><FONT 
size=1></FONT></SPAN></SPAN>&nbsp;</DIV>
<DIV><SPAN class=362505121-09052002><SPAN class=362505121-09052002><FONT 
size=1>pk/</FONT></SPAN></SPAN></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT size=2>-----Original 
  Message-----<BR><B>From:</B> Jason Spangler 
  [mailto:JasonS@cassco.org]<BR><B>Sent:</B> Thursday, May 09, 2002 3:56 
  PM<BR><B>To:</B> mapserver-users@lists.gis.umn.edu<BR><B>Subject:</B> 
  [mapserver-users] Filename<BR><BR></FONT></DIV>
  <DIV><FONT size=1>I'm sure I'm overlooking something, but is it possible to 
  change the name of the tmp map image file name?</FONT></DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV><FONT size=1>I would like to add different variables to the beginning of 
  the filename at different times of the day.</FONT></DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV><FONT size=1>Any help would be appreciated.</FONT></DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV><FONT size=1>Thanks,</FONT></DIV>
  <DIV><FONT size=1>Jason</FONT></DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV><FONT size=1></FONT>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Jason Spangler<BR>Cass County Information Systems<BR>616-445-4489<BR><A 
  href="mailto:jasons@cassco.org">jasons@cassco.org</A></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C1F7A4.799C7B00--