Need Help with Mapscript Tcl - mapObj

Tom Poindexter tpoindex at nyx.net
Thu Dec 7 13:47:00 PST 2000


On Thu, Dec 07, 2000 at 11:45:55AM -0700, Yeewen Sat wrote:
> If I use namespace, I get these errors:
> 
> invalid command name "mapscript::mapObj"

> So, I don't use mapscript namespace in my tcl.

Try the CVS sources (e.g., nightly download).  The configure/make should build
the interface to use mapscript:: namespace.

> Thanks to Tom for the ms_error suggestion, I found out what my problem was.
> It's in newsym.sym file - some invalid gif images reference. I don't really
> need them, so I removed them. At the end, I was able to load a mapfile, draw
> it, and save the image (.gif) created.

Great!

> Now, I have more questions :-)
> 
> Is there a way to generate GIF images based on the zoom value,
> mapsize...like how mapserv cgi does it - given a mapfile, zoom value,
> mapsize, imgext, imgxy, creates a gif for the specified area. So, can I do
> that through mapscript? Right now, load, draw and save image will save the
> entire map.

The best source for doing this is in the msexplorer.tcl file.  Basically, you
modify the mapObj's data members before drawing for your own size, extents, etc.

Speaking of my MapServer Workbench, I hope to have another release by this
weekend.  I've got a simple 'App Wizard' that walks you through building
a MapServer application from scratch (assuming you have data files somewhere,
and know some about MapServer.)  It will build a mapfile and 'ms_demo' type
html files, an initial reference map image, and a simple install sh script.
It's a rough start, but does build a working mapfile on the first try.  The
idea is that you can then use msedit and msexplorer to fine tune your map.

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



More information about the MapServer-users mailing list