[Mapserver-users] swf color droping problem

Aaron D. Hunt hunt at zedxinc.com
Tue Nov 25 09:59:47 EST 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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The mapscript code&nbsp; and map file =
are bellow.=20
Thank you for any help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Aaron</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#!/usr/bin/perl</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>use lib("/home/mapserver");<BR>use=20
mapscript40;</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV><BR>my $map =3D new mapscript40::mapObj("geotif.map") or =
die("Unable to open=20
mapfile. $!");</DIV>
<DIV>&nbsp;</DIV>
<DIV>$img =3D $map-&gt;draw() or die('Unable to draw map');</DIV>
<DIV>&nbsp;</DIV>
<DIV>$imagename =3D "test.swf";</DIV>
<DIV>&nbsp;</DIV>
<DIV>$img-&gt;save($imagename);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>The mapfile is</DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV>#<BR># Start of web interface definition<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV>WEB<BR>&nbsp; IMAGEPATH "/home/hunt/"<BR>&nbsp; IMAGEURL =
""<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV>SYMBOL<BR>&nbsp; NAME "circle"<BR>&nbsp; TYPE ellipse<BR>&nbsp; =
FILLED=20
true<BR>&nbsp; POINTS<BR>&nbsp;&nbsp;&nbsp; 1 1<BR>&nbsp; =
END<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV>PROJECTION<BR>&nbsp;"proj=3Dlonglat"<BR>&nbsp;"ellps=3DWGS84"<BR>&nb=
sp;"unit=3Ddd"<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>OUTPUTFORMAT <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME =
swf=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MIMETYPE=20
"application/x-shockwave-flash" <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
DRIVER=20
swf <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #IMAGEMODE RGBA=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FORMATOPTION =
"OUTPUT_MOVIE=3DMULTIPLE"=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END </DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;LAYER<BR>&nbsp;&nbsp;&nbsp; NAME =
LandSat<BR>&nbsp;&nbsp;&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_title"=20
"LandSat"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_srs"&nbsp;&nbsp; =
"EPSG:4326"=20
#WGS 84<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_connectiontimeout"=20
"10"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LYRNAME=20
"LandSat"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINK =
"N/A"<BR>&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;&nbsp;&nbsp; STATUS ON <BR>&nbsp;&nbsp;&nbsp; TYPE=20
RASTER<BR>&nbsp;&nbsp;&nbsp; OFFSITE 255 255 255<BR>&nbsp;&nbsp;&nbsp;=20
CONNECTIONTYPE WMS<BR>&nbsp;&nbsp;&nbsp; CONNECTION "<A=20
href=3D"http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&amp;REQUEST=3Dmap&=
amp;LAYERS=3Dus_landsat7o&amp;red=3D4&amp;green=3D3&amp;blue=3D1&amp;ld=3D=
25&amp;le=3D45&amp;ls=3D0&amp;gamma=3D2.5&amp;STYLES=3D&amp;FORMAT=3Djpeg=
&amp;TRANSPARENT=3DTRUE">http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&a=
mp;REQUEST=3Dmap&amp;LAYERS=3Dus_landsat7o&amp;red=3D4&amp;green=3D3&amp;=
blue=3D1&amp;ld=3D25&amp;le=3D45&amp;ls=3D0&amp;gamma=3D2.5&amp;STYLES=3D=
&amp;FORMAT=3Djpeg&amp;TRANSPARENT=3DTRUE</A>&amp;"<BR>&nbsp;&nbsp;&nbsp;=
=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "init=3Depsg:4326" #WGS=20
84<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>END</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Aaron D. Hunt<BR>Technical =
Manager<BR>ZedX=20
Inc.<BR>Voice: 814-357-8490<BR>Fax:&nbsp;&nbsp;&nbsp;=20
814-357-8499</FONT></DIV></BODY></HTML>

------=_NextPart_000_008B_01C3B33A.DBD48940--




More information about the mapserver-users mailing list