using System; using OSGeo.MapServer; /** *

Title: Mapscript shape dump example.

*

Description: A C# based mapscript example to create an image given a mapfile.

* @author Yew K Choo ykchoo@geozervice.com * @version 1.0 */ /// /// A C# based mapscript mapscript example to create an image given a mapfile. /// class DrawMap { public static void usage() { Console.WriteLine("usage: DrawMap {mapfile} {outfile} {imagetype optional}"); System.Environment.Exit(-1); } public static void Main(string[] args) { if (args.Length < 2) usage(); mapObj m_obj = new mapObj(args[0]); if (args.Length >= 3) { Console.WriteLine("Setting the imagetype to " + args[2]); m_obj.setImageType(args[2]); } Console.WriteLine ("# Map layers " + m_obj.numlayers + "; Map name = " + m_obj.name); for (int i=0; i