Problem unsing FLASH with php_mapscript

William Bronsema wbronsema at DMSOLUTIONS.CA
Thu Feb 17 04:17:17 PST 2005


Hi Jeremiah,

When you use the "MULTIPLE" option for SWF output Mapserver will create one
SWF for each layer.  Because of this you need to append "_layer_x" (where
"x" is the layer index) to the temp layer name that comes from the
"saveWebImage" call.

In your case you will want to do something like:
$image=$map->draw();
$image_url=$image->saveWebImage();
$image_url = substr( $image_url, 0, -4 ) // chop the .swf

Then you can reference the layer SWFs like:
<?php echo $image_url.'_layer_0.swf'?>

HTH

Regards,
Bill
________________________________________________
William A. Bronsema, C.E.T.
Applications and Software Development,
DM Solutions Group Inc.


> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of knochej at GEO.ORST.EDU
> Sent: February 16, 2005 7:39 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Problem unsing FLASH with php_mapscript
>
> When I use the following .phtml with PHP_Mapscript_42, I get a SWF which
> zooms on the clientside very nicely.  When I replace the mapscript with
> the
> PHP_mapscript_44.dll,  the SWF that is created has poor resolution - when
> I
> zoom in its pixelated.  I assume that when using mapscript_44 my map is
> being rasterized somehow.  How do I avoid this and get a vector output
> SWF?
>
> When I specify outputformat using the standard outputformat object for swf
> in the map file, but use FORMATOPTION "OUTPUT_MOVIE=MULTIPLE" I get no
> image
> with the .phtml described below.
>
> <?php
> dl("php_mapscript_42.dll");
> $map_file="./flashphp.map";
> $map = ms_newMapObj($map_file);
> $image=$map->draw();
> $image_url=$image->saveWebImage();
> ?>
> <html>
>   <body bgcolor=#FFFFFF>
>     <object>
>       <param name="movie" value="<?php echo $image_url?>">
>       <embed border=1 src="<?php echo $image_url?>"
>                width="800" height="500" quality="high"
>         TYPE="application/x-shockwave-flash"
>         PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
>       </embed>
>     </object>
>   </body>
> </html>
>
> Thanks for any help,
>
> Jeremiah Knoche
> Oregon State University - Geosciences
> knochej at geo.orst.edu



More information about the MapServer-users mailing list