Changes between Initial Version and Version 1 of PerlUsage


Ignore:
Timestamp:
Jan 29, 2009, 10:27:55 AM (14 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PerlUsage

    v1 v1  
     1= Usage =
     2Here is a simple perl example that loads a mapfile,
     3creates an image and saves it:
     4{{{
     5#!perl
     6#!/usr/bin/perl -w
     7use mapscript;
     8#
     9# Include XBase for access to XBase/DBF files.
     10use XBase;
     11#
     12# Include DBI so XBase files can be queried in an SQL manner.
     13use DBI;
     14#
     15# Start the map.
     16my $map = new mapscript::mapObj('boundary.map') or die('Unable to open mapfile.');
     17#
     18# Render the map.
     19my $img = $map->draw() or die('Unable to draw map');
     20#
     21# Save the rendered image.
     22my $void = $img->saveImage('example.png', $mapscript::MS_PNG, $map->{transparent}, $map->{interlace}, 0);
     23}}}
     24----
     25back to PerlMapScript