Ruby mapscript oddness

Steve Lime Steve.Lime at DNR.STATE.MN.US
Fri Nov 17 14:24:12 EST 2006


The mapfile would help...

>>> The Cunctator <cunctator at GMAIL.COM> 11/17/2006 1:09:48 PM >>>
I'm happy to give settings/sample files etc but maybe someone has some
idea
what my problem is -- I'm guessing it has to do with the installation.

The following script:

#!/usr/bin/env ruby

require "mapscript"
include Mapscript

map=MapObj.new("test.map")
image = map.draw
image.save('test.png')

fails:

in `draw': msEvalExpresssion: Expression parser error. Failed to parse
expression;msyyparse(): Expression parser error. syntax
error;msEvalExpression: Expression parser error. Failed to parse
expression;msyyparse():
...

etc.

whereas the php script

<?php
if(!extension_loaded("MapScript")) {
   dl('php_mapscript.'.PHP_SHLIB_SUFFIX);
}

$map = ms_newMapObj("test.map");

$image = $map->draw();
$image->saveImage('test.png');

?>

works fine.

map.drawLegend
and
map.drawScalebar
work fine.

Anyone have thoughts or what information would people need to
diagnose?



More information about the mapserver-users mailing list