Ciao Attila, the IMAGEURL cannot be 'c:/ms4w/tmp/ms_tmp/', it would be something like '/tmp/ms_tmp/', a URL not a local path.
ciao..................... pg -- Pietro Giannini Bytewise srl - Area GIS 41°50'38.58"N 12°29'13.39"E On Mer, Novembre 19, 2008 12:05, Attila Borbás wrote: > Hello, > > Thanx for the previous answer. I ve tested my mapfiles (with quickmap.php) > and they work fine, but the problem is the same. My php/mapscript code > created the map image and saved it to "/ms_tmp/" but the browser couldn't > display it (I got a broken img). I enclose the php/mapscript file, the > mapfile and the page source.Thx for ur help. > > *mapfile (I created it with qgis):* > MAP > NAME world_raster > SIZE 600 600 > UNITS dd > > EXTENT -188.678212 -114.270312 189.321981 107.893344 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > > IMAGECOLOR 192 192 192 > IMAGEQUALITY 95 > IMAGETYPE jpeg > OUTPUTFORMAT > NAME jpeg > DRIVER 'GD/JPEG' > MIMETYPE 'image/jpeg' > #IMAGEMODE PC256 > EXTENSION 'jpeg' > END > LEGEND > IMAGECOLOR 255 255 255 > STATUS ON > KEYSIZE 18 12 > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > END > > > WEB > > IMAGEPATH 'c:/ms4w/tmp/ms_tmp/' > IMAGEURL 'c:/ms4w/tmp/ms_tmp/' > > METADATA > 'wms_title' 'world_raster' > 'wms_onlineresource' > 'http://my.host.com/cgi-bin/mapserv?map=wms.map& > ' > 'wms_srs' 'EPSG:4326' > END > > END > > LAYER > NAME 'world_raster' > TYPE RASTER > DATA 'c:/ms4w/Apache/htdocs/world_raster.tif' > METADATA > 'wms_title' 'world_raster' > END > STATUS DEFAULT > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > END > > END > *php/mapscript code:* > <?php > define( "MAPFILE", "C:/ms4w/apps/raster/raster.map" ); > define( "MODULE", "php_mapscript.dll" ); > if(!extension_loaded("mapscript")) dl(MODULE); > $oMap = ms_newMapObj( MAPFILE ); > //draw > $oImage = $oMap->draw(); > //output map > $url = $oImage->saveWebImage(); > ?> > <HTML> > <HEAD> > <TITLE>Example 1: Displaying a map</TITLE> > </HEAD> > <BODY> > <IMG SRC="<?php echo $url; ?>"> > </BODY> > </HTML> > > *Page source (after I ran the code the html part saw the link to the image > but didn't display it.):* > <HTML> > <HEAD> > <TITLE>Example 1: Displaying a map</TITLE> > </HEAD> > <BODY> > <IMG SRC="c:/ms4w/tmp/ms_tmp/4923f091_c84_0.jpeg"> > </BODY> > </HTML> > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
