[mapserver-users] Filename
Jason Spangler
JasonS@cassco.org
Fri, 10 May 2002 15:58:45 -0400
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=_C9942467.FA9BF71D
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Thanks pk, but unfortunately, I'm not to hip on the perl yet. Is there a =
variable you can pass in the querystring that identifies the filename?
Thanks,
Jason
Jason Spangler
Cass County Information Systems
616-445-4489
jasons@cassco.org
>>> Puneet Kishor <pkishor@geoanalytics.com> 05/09/02 05:57PM >>>
very easy to do with Perl/Mapscript. It might be hardcoded into the =
PHP/Mapscript methods.
here's how in Perl
my $appurl =3D "url/to/my/app/";
my $tmpdir =3D "path/to/my/tmp/";
my $mapimgname =3D $whateveriwant . time() . ".png"; # time() makes it =
unique, .png adds the extension
my $imgObj =3D $mapObj->draw();
mapscript::msSaveImage($imgObj, $tmpdir . $mapimgname, 2, $mapObj->{interla=
ce}, $mapObj->{transparent}, 95);=20
my $mapurl =3D $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
--=_C9942467.FA9BF71D
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><FONT size=3D1>Thanks pk, but unfortunately, I'm not to hip on the =
perl=20
yet. Is there a variable you can pass in the querystring that =
identifies=20
the filename?</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1>Thanks,</FONT></DIV>
<DIV><FONT size=3D1>Jason</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Jason Spangler<BR>Cass County Information Systems<BR>616-445-4489<BR><=
A=20
href=3D"mailto:jasons@cassco.org">jasons@cassco.org</A></DIV>
<DIV> </DIV>
<DIV><BR><BR>>>> Puneet Kishor <pkishor@geoanalytics.com>=20=
05/09/02 05:57PM >>><BR></DIV><FONT face=3DTahoma size=3D1>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>very easy to do =
with=20
Perl/Mapscript. It might be hardcoded into the PHP/Mapscript=20
methods.</FONT></SPAN></DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1></FONT></SPAN> </=
DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>here's how in=20
Perl</FONT></SPAN></DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1></FONT></SPAN> </=
DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>my $appurl =3D=20
"url/to/my/app/";</FONT></SPAN></DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>my $tmpdir =3D=20
"path/to/my/tmp/";</FONT></SPAN></DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>my $mapimgname =3D =
$whateveriwant=20
. time() . ".png"; # time() makes it unique, .png adds the=20
extension</FONT></SPAN></DIV>
<DIV><SPAN class=3D362505121-09052002><FONT size=3D1>my $imgObj =3D=20
$mapObj->draw();<BR>mapscript::msSaveImage($imgObj, $tmpdir . $mapimgnam=
e, 2,=20
$mapObj->{interlace}, $mapObj->{transparent}, 95); </FONT></SPAN></DI=
V>
<DIV><SPAN class=3D362505121-09052002><SPAN class=3D362505121-09052002><FON=
T=20
size=3D1>my $mapurl =3D $appurl . "tmp/" . $mapimgname;</FONT></SPAN></SPAN=
></DIV>
<DIV><SPAN class=3D362505121-09052002><SPAN class=3D362505121-09052002><FON=
T=20
size=3D1></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=3D362505121-09052002><SPAN class=3D362505121-09052002><FON=
T=20
size=3D1>pk/</FONT></SPAN></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT size=3D2>-=
----Original=20
Message-----<BR><B>From:</B> Jason Spangler=20
[mailto:JasonS@cassco.org]<BR><B>Sent:</B> Thursday, May 09, 2002 =
3:56=20
PM<BR><B>To:</B> mapserver-users@lists.gis.umn.edu<BR><B>Subject:</B>=20
[mapserver-users] Filename<BR><BR></FONT></DIV>
<DIV><FONT size=3D1>I'm sure I'm overlooking something, but is it =
possible to=20
change the name of the tmp map image file name?</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1>I would like to add different variables to the =
beginning of=20
the filename at different times of the day.</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1>Any help would be appreciated.</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1>Thanks,</FONT></DIV>
<DIV><FONT size=3D1>Jason</FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Jason Spangler<BR>Cass County Information Systems<BR>616-445-4489<BR=
><A=20
href=3D"mailto:jasons@cassco.org">jasons@cassco.org</A></DIV>
<DIV> </DIV>
<DIV> </DIV></BLOCKQUOTE></FONT></BODY></HTML>
--=_C9942467.FA9BF71D--