[mapserver-users] Blank Map Image/Reference Image OK

Chuck Bokath chuck.bokath at air2web.com
Wed Nov 28 16:08:27 EST 2001


 
Hi,
 
I have mapserver 3.5, and PHP/Mapscript installed with Apache1.3.12 as the
webserver.
 
The problem I am having is that I can display my Image.gif during
mode=reference, but when
I use mode=map, I get a blank Image. I have been trying to figure this one
out for a good long time, going through the listserv, and the such, but I am
completely stumped. Could it be my extent is incorrect? Do I need a
shapefile for the MapObject? 
 
Here is a snippet of my php app
 
======================================

$map = ms_newMapObj("MetroAtl.map");
 
//print $map->numlayers;
// phpinfo();
 
$img = $map->drawReferenceMap(); <<=== Renders a .gif Image Correctly
 
[ snip 
$img = $map->draw(); <<== when this is uncommented, it does not render an
Image
]
$url = $img->saveWebImage(0, 0);
printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width,
$map->height);
=======================================
 
Any ideas would be greatly appreciated.
 
Here is my .map file
 
MAP
NAME METROATL
STATUS ON
SIZE 250 250
UNITS DD
EXTENT -82.000 26.000 -82.500 26.000
TRANSPARENT ON
 
REFERENCE
IMAGE /lbsimages/Maps/gif/MetroAtl.gif
SIZE 600 600
STATUS ON
EXTENT -82.000 26.000 -82.500 26.000
OUTLINECOLOR 255 0 0
END
 
WEB
TEMPLATE atltemplate.html
IMAGEPATH "d:/lbsimages/tmp/"
IMAGEURL "d:/lbsimages/tmp/"
LOG "d:/lbsimages/atl.log"
END
 
PROJECTION
 GEOGRAPHIC
END
 
LEGEND
STATUS ON
LABEL
TYPE TRUETYPE
FONT arial
COLOR 0 0 0
SIZE 12
ANTIALIAS
END
END
 

LAYER
NAME "GENERAL"
#DESCRIPTION TEST
TYPE RASTER
DATA /lbsimages/Maps/gif/Atlanta.gif
#SIZE 250 250
END
END
 

 
Chuck Bokath
Sr Engineer
Wireless R & D
Air2Web, Inc.
 
Promenade II
1230 Peachtree Rd
Atlanta, Georgia
+1 404 942 5311
 



More information about the mapserver-users mailing list