Problems with Java Mapscript

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Mon Nov 19 06:44:31 EST 2007


Try this:

public class DrawMap {

 public static void usage() {
   System.err.println("Usage: DrawMap {mapfile} {outfile}");
   System.exit(-1);
 }

 public static void main(String[] args) {
   if (args.length != 2) usage();

   System.out.println(args[0]);
   mapObj map = new mapObj(args[0]);
   imageObj img = map.draw();
   System.out.println("The map will be drawn to:"+args[1]);
   img.save(args[1], map);
 }
}



More information about the mapserver-users mailing list