[Mapserver-users] swf color droping problem
Aaron D. Hunt
hunt at zedxinc.com
Tue Nov 25 06:59:47 PST 2003
This is a multi-part message in MIME format.
------=_NextPart_000_008B_01C3B33A.DBD48940
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
When I create a swf with mapserver, it is dropping colors. It looks to =
be 8 or 16 colors. An example of this can be seen at
http://web.zedxinc.com/~hunt/flash.html
The mapscript code and map file are bellow. Thank you for any help.
Aaron
#!/usr/bin/perl
use lib("/home/mapserver");
use mapscript40;
$ENV{MS_ERRORFILE} =3D "mapserver.log";=20
$ENV{PROJ_LIB} =3D "/home/mapserver/proj-4.4.7/nad/";=20
my $map =3D new mapscript40::mapObj("geotif.map") or die("Unable to open =
mapfile. $!");
$img =3D $map->draw() or die('Unable to draw map');
$imagename =3D "test.swf";
$img->save($imagename);
The mapfile is
# Start of map file
#
NAME Soil
STATUS ON
SIZE 500 500
EXTENT -90.637762 33.623924 -90.601165 33.650091
UNITS DD
SHAPEPATH "/tmp"
IMAGECOLOR 255 255 255
#
# Start of web interface definition
#
WEB
IMAGEPATH "/home/hunt/"
IMAGEURL ""
END
SYMBOL
NAME "circle"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
PROJECTION
"proj=3Dlonglat"
"ellps=3DWGS84"
"unit=3Ddd"
END
OUTPUTFORMAT=20
NAME swf=20
MIMETYPE "application/x-shockwave-flash"=20
DRIVER swf=20
#IMAGEMODE RGBA=20
FORMATOPTION "OUTPUT_MOVIE=3DMULTIPLE"=20
END=20
LAYER
NAME LandSat
METADATA
"wms_title" "LandSat"
"wms_srs" "EPSG:4326" #WGS 84
"wms_connectiontimeout" "10"
LYRNAME "LandSat"
LINK "N/A"
END
STATUS ON=20
TYPE RASTER
OFFSITE 255 255 255
CONNECTIONTYPE WMS
CONNECTION =
"http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&REQUEST=3Dmap&LAYERS=3Dus=
_landsat7o&red=3D4&green=3D3&blue=3D1&ld=3D25&le=3D45&ls=3D0&gamma=3D2.5&=
STYLES=3D&FORMAT=3Djpeg&TRANSPARENT=3DTRUE&"
PROJECTION
"init=3Depsg:4326" #WGS 84
END
END
END
Aaron D. Hunt
Technical Manager
ZedX Inc.
Voice: 814-357-8490
Fax: 814-357-8499
------=_NextPart_000_008B_01C3B33A.DBD48940
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.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>When I create a swf with mapserver, it =
is dropping=20
colors. It looks to be 8 or 16 colors. An example of this can be seen=20
at</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://web.zedxinc.com/~hunt/flash.html">http://web.zedxinc.com/~=
hunt/flash.html</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The mapscript code and map file =
are bellow.=20
Thank you for any help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Aaron</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>#!/usr/bin/perl</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>use lib("/home/mapserver");<BR>use=20
mapscript40;</FONT></DIV>
<DIV> </DIV><FONT face=3DArial size=3D2>
<DIV><BR>$ENV{MS_ERRORFILE} =3D "mapserver.log"; <BR>$ENV{PROJ_LIB} =3D=20
"/home/mapserver/proj-4.4.7/nad/"; </DIV>
<DIV> </DIV>
<DIV><BR>my $map =3D new mapscript40::mapObj("geotif.map") or =
die("Unable to open=20
mapfile. $!");</DIV>
<DIV> </DIV>
<DIV>$img =3D $map->draw() or die('Unable to draw map');</DIV>
<DIV> </DIV>
<DIV>$imagename =3D "test.swf";</DIV>
<DIV> </DIV>
<DIV>$img->save($imagename);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>The mapfile is</DIV>
<DIV> </DIV>
<DIV># Start of map file<BR>#<BR>NAME Soil<BR>STATUS ON<BR>SIZE 500=20
500<BR>EXTENT -90.637762 33.623924 -90.601165 33.650091<BR>UNITS =
DD<BR>SHAPEPATH=20
"/tmp"<BR>IMAGECOLOR 255 255 255</DIV>
<DIV> </DIV>
<DIV>#<BR># Start of web interface definition<BR>#</DIV>
<DIV> </DIV>
<DIV>WEB<BR> IMAGEPATH "/home/hunt/"<BR> IMAGEURL =
""<BR>END</DIV>
<DIV> </DIV>
<DIV>SYMBOL<BR> NAME "circle"<BR> TYPE ellipse<BR> =
FILLED=20
true<BR> POINTS<BR> 1 1<BR> =
END<BR>END</DIV>
<DIV> </DIV>
<DIV>PROJECTION<BR> "proj=3Dlonglat"<BR> "ellps=3DWGS84"<BR>&nb=
sp;"unit=3Ddd"<BR>END</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>OUTPUTFORMAT <BR> NAME =
swf=20
<BR> MIMETYPE=20
"application/x-shockwave-flash" <BR> =
DRIVER=20
swf <BR> #IMAGEMODE RGBA=20
<BR> FORMATOPTION =
"OUTPUT_MOVIE=3DMULTIPLE"=20
<BR> END </DIV>
<DIV> </DIV>
<DIV><BR> LAYER<BR> NAME =
LandSat<BR> =20
METADATA<BR> "wms_title"=20
"LandSat"<BR> "wms_srs" =
"EPSG:4326"=20
#WGS 84<BR> "wms_connectiontimeout"=20
"10"<BR> LYRNAME=20
"LandSat"<BR> LINK =
"N/A"<BR> =20
END<BR> STATUS ON <BR> TYPE=20
RASTER<BR> OFFSITE 255 255 255<BR> =20
CONNECTIONTYPE WMS<BR> CONNECTION "<A=20
href=3D"http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&REQUEST=3Dmap&=
amp;LAYERS=3Dus_landsat7o&red=3D4&green=3D3&blue=3D1&ld=3D=
25&le=3D45&ls=3D0&gamma=3D2.5&STYLES=3D&FORMAT=3Djpeg=
&TRANSPARENT=3DTRUE">http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&a=
mp;REQUEST=3Dmap&LAYERS=3Dus_landsat7o&red=3D4&green=3D3&=
blue=3D1&ld=3D25&le=3D45&ls=3D0&gamma=3D2.5&STYLES=3D=
&FORMAT=3Djpeg&TRANSPARENT=3DTRUE</A>&"<BR> =
=20
PROJECTION<BR> "init=3Depsg:4326" #WGS=20
84<BR> END<BR> END</DIV>
<DIV> </DIV>
<DIV>END</DIV>
<DIV> </DIV>
<DIV></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Aaron D. Hunt<BR>Technical =
Manager<BR>ZedX=20
Inc.<BR>Voice: 814-357-8490<BR>Fax: =20
814-357-8499</FONT></DIV></BODY></HTML>
------=_NextPart_000_008B_01C3B33A.DBD48940--
More information about the MapServer-users
mailing list