Need Help with Mapscript Tcl - mapObj

Tom Poindexter tpoindex at nyx.net
Wed Dec 6 13:50:57 PST 2000


On Wed, Dec 06, 2000 at 11:44:20AM -0700, Yeewen Sat wrote:

> I constructed a mapObj with a mapfile with this line:
>
> mapObj map1 $file

The Tcl Mapscript interface should live in the 'mapscript' namespace:

  mapscript::mapObj map1 $file


> $file is the mapfile name without the .map extension. (with .map extension,
> I got segmentation fault in tclsh)


The file name should include .map

> I don't understand why I keep getting NULL back from it...and what ever I do
> after will (of course) fails.

You can examine the 'ms_error' object to get the failure codes:

puts [mapscript::ms_error cget -code]
puts [mapscript::ms_error cget -routine]
puts [mapscript::ms_error cget -message]

The message is rather terse, but you should be able to figure out what
the mapfile parse is complaining about.

-- 
Tom Poindexter
tpoindex at nyx.net
http://www.nyx.net/~tpoindex/



More information about the MapServer-users mailing list