Need Help with Mapscript Tcl - mapObj

Yeewen Sat yeewen at petromap.com
Wed Dec 6 13:44:20 EST 2000


Hi,
I'm trying use mapscript exported functions in Tcl to do what mapserv cgi
does - ie. load a mapfile and generate a GIF, given the mapsize, image
extent, zoom, imagexy.

I constructed a mapObj with a mapfile with this line:

mapObj map1 $file

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

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


Here's the rest of my tcl script:

package require Mapscript
package require msTclObjs

set file $argv

mapObj map1 $file

puts "\tmapfile: $file"

set rectPtr [map1 cget -extent]
puts "got rectPtr"
puts "\textent: [rectObj_miny_get $rectPtr]"


Thanks,
Yeewen




More information about the mapserver-users mailing list