<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>[UMN_MAPSERVER-USERS] Bug? MapServer as an html &lt;img .. &gt; source</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText85803 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Ugh I meant web server error 
log.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>-e</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List on behalf of 
Ethan Alpert<BR><B>Sent:</B> Fri 11/19/2004 7:39 PM<BR><B>To:</B> 
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] Bug? 
MapServer as an html &lt;img .. &gt; source<BR></FONT><BR></DIV>
<DIV>
<DIV id=idOWAReplyText13675 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Two STYLE blocks in your 
LAYER definition seem suscpicious. What happens if you set up the class 
like:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME 
"Forest Fire Areas"<BR>&nbsp;&nbsp;&nbsp;&nbsp; COLOR 200 110 
110<BR>&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 100 100 100<BR>&nbsp; 
END</FONT><BR></DIV>
<DIV dir=ltr>BTW, If you get a red X when using a &lt;img&gt; tag. Type the src 
part directly into the browser. ie:</DIV>
<DIV dir=ltr><FONT size=2><A 
href="http://yourmachine/cgi-bin/mapserv.exe?&amp;mode=map&amp;mapext=XX">http://yourmachine/cgi-bin/mapserv.exe?&amp;mode=map&amp;mapext=XX</A> 
XX XX XX&amp;map=[map]<BR>&amp;map_SIZE=125 
75&amp;layer=Forest_Fires_1965-2003'</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>This way you get an error message (hopefully). If you 
don't you might need to look at your webbrowser error log.</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>-e</FONT></DIV></DIV>
<DIV dir=ltr>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List on behalf of Ken 
Lord<BR><B>Sent:</B> Fri 11/19/2004 7:27 PM<BR><B>To:</B> 
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] Bug? 
MapServer as an html &lt;img .. &gt; source<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>I use mapserver to generate thumbnail images in query result 
pages, using<BR>mapserver as the source for an html &lt;img ...&gt; 
tag.<BR><BR>This has worked fine in MapServer 3.6 CGI without errors. I've 
used<BR>variables passed in the URL to layers with filteritems to have the 
queried<BR>features shown alone with background layers, used URL parameters to 
modify<BR>the map file dynamicaly to embed and resize the scalebar, and added a 
cross<BR>hair to center of the image using the map_webuser.. URL 
parameters.<BR><BR>I'm now trying to do the same with MapServer 4.2.0 CGI. using 
the same<BR>polygon dataset as I was using in 3.6. It is not working 
consistantly.<BR><BR>It will work generating an image for some polygons, fail - 
not returning an<BR>image when other polygons in the same layer are queried, and 
work for other<BR>polygons in the same layer if you click in just the right 
place within<BR>them.&nbsp; For all these queries, all the other attributes 
queried are being<BR>returned correctly in my template. Restarting the server 
had the effect of<BR>shuffling the polygons that would and wouldnt 
work.<BR><BR>I have simplified the image source string down to only the problem 
layer,<BR>with no filtering, and only the parameters necessary to create the 
image.<BR><BR>Simplified, the img tag looks like this:<BR><BR>&lt;img 
src='../scripts/mapserv.exe?&amp;mode=map&amp;mapext=XX XX XX 
XX&amp;map=[map]<BR>&amp;map_SIZE=125 
75&amp;layer=Forest_Fires_1965-2003'&gt;<BR><BR>The mapext gets filled in by 
javascript.<BR><BR>If I change it so that it displays some other background 
layer, but not the<BR>layer being queried,&nbsp; the image returns properly 
everytime.<BR><BR>The layer within the mapfile looks like 
this:<BR><BR>LAYER<BR>&nbsp; NAME Forest_Fires_1965-2003<BR>&nbsp; TYPE 
POLYGON<BR>&nbsp; STATUS ON<BR>&nbsp; DATA "nt_FFIRES_a"<BR>&nbsp; HEADER 
"results/Forest_Fires_1965-2003_header.html"<BR>&nbsp; TEMPLATE 
"results/Forest_Fires_1965-2003_results.html"<BR>&nbsp; TOLERANCE 2<BR>&nbsp; 
TOLERANCEUNITS pixels<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"init=EPSG:26910"<BR>&nbsp; END<BR>&nbsp; 
CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME "Forest Fire 
Areas"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp; COLOR 
200 110 110<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
OUTLINECOLOR 100 100 100<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>&nbsp; 
END<BR>END<BR><BR>I can't figure out why it works sometimes ... instead of 
always or never.<BR>It is the identical dataset that works everytime for the 
same use with<BR>mapserver 3.6.&nbsp; The shapefile is about 9mb of very 
irregular polygons.<BR><BR>Is this a new bug? has it already been fixed in 4.4? 
Will I have to keep a<BR>set of 3.6 files in place just to make the 
thumbnails?<BR><BR>Any ideas would be appreciated, the thumbnails add a lot of 
power to the<BR>query result pages.<BR><BR>Thanks,<BR>Ken Lord<BR>Vancouver 
BC<BR></FONT></P></DIV></DIV>

</BODY>
</HTML>