Here.... ruby chokes on the EXPRESSION. (For example, EXPRESSION (25>0) works.)<br><br>MAP<br> NAME "Election Results"<br> STATUS ON<br> EXTENT -2450520 -1730156 2332934 1953725 <br> SIZE 600 450 <br> SHAPEPATH "./data"
<br> SYMBOLSET "./etc/symbols.sym"<br> FONTSET "./etc/fonts.txt"<br> IMAGETYPE PNG<br> IMAGECOLOR 255 255 255<br> UNITS METERS<br> #<br> # Start of OutputFormat object<br> #<br> OUTPUTFORMAT<br>
NAME "png"<br> MIMETYPE "image/png"<br> DRIVER "GD/PNG"<br> EXTENSION "png"<br> IMAGEMODE PC256<br> TRANSPARENT FALSE<br> END<br>#<br># Start of layer definitions
<br>#<br> LAYER<br> NAME "House of Representatives"<br> GROUP "House of Representatives"<br> STATUS ON<br> DATA "the_geom FROM (SELECT state, seatnumber, gid, the_geom,<br> round(cast(dempct*100 as numeric),2) as dempct
<br> from cds<br> ) a using unique gid using srid=-1"<br> TYPE POLYGON<br> CONNECTIONTYPE POSTGIS<br> CONNECTION "user=user dbname=cd host=host"<br> UNITS METERS
<br> LABELITEM "seatnumber"<br> LABELMAXSCALE 4000000<br> TEMPLATE "newtemplate.html"<br> CLASSITEM "dempct"<br> CLASS<br> NAME "Democrat"<br> EXPRESSION ([dempct] > 25)
<br> STYLE<br> SYMBOL 11<br> COLOR 0 0 255<br> OUTLINECOLOR 0 0 0<br> SIZE 1<br> END<br> END<br> CLASS<br> STYLE<br> SYMBOL 7<br> COLOR 0 0 0<br> OUTLINECOLOR 0 0 0
<br> SIZE 1<br> END<br> END<br> END<br>END<br><br><br><br><div><span class="gmail_quote">On 11/17/06, <b class="gmail_sendername">Steve Lime</b> <<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The mapfile would help...<br><br>>>> The Cunctator <<a href="mailto:cunctator@GMAIL.COM">
cunctator@GMAIL.COM</a>> 11/17/2006 1:09:48 PM >>><br>I'm happy to give settings/sample files etc but maybe someone has some<br>idea<br>what my problem is -- I'm guessing it has to do with the installation.<br>
<br>The following script:<br><br>#!/usr/bin/env ruby<br><br>require "mapscript"<br>include Mapscript<br><br>map=MapObj.new("test.map")<br>image = map.draw<br>image.save('test.png')<br><br>fails:<br><br>
in `draw': msEvalExpresssion: Expression parser error. Failed to parse<br>expression;msyyparse(): Expression parser error. syntax<br>error;msEvalExpression: Expression parser error. Failed to parse<br>expression;msyyparse():
<br>...<br><br>etc.<br><br>whereas the php script<br><br><?php<br>if(!extension_loaded("MapScript")) {<br> dl('php_mapscript.'.PHP_SHLIB_SUFFIX);<br>}<br><br>$map = ms_newMapObj("test.map");<br><br>
$image = $map->draw();<br>$image->saveImage('test.png');<br><br>?><br><br>works fine.<br><br>map.drawLegend<br>and<br>map.drawScalebar<br>work fine.<br><br>Anyone have thoughts or what information would people need to
<br>diagnose?<br></blockquote></div><br>