FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

PerlUsage · MapServer/MapServer Wiki · GitHub

PerlUsage · MapServer/MapServer Wiki · GitHub
Skip to content

Navigation Menu

Thomas Bonfort edited this page Apr 6, 2012 · 2 revisions

creates an image and saves it:

#!perl                                                                                                   
#!/usr/bin/perl -w                                                                                       
use mapscript;                                                                                           
#                                                                                                        
# Include XBase for access to XBase/DBF files.                                                           
use XBase;                                                                                               
#                                                                                                        
# Include DBI so XBase files can be queried in an SQL manner.                                            
use DBI;                                                                                                 
#                                                                                                        
# Start the map.                                                                                         
my $map = new mapscript::mapObj('boundary.map') or die('Unable to open mapfile.');                       
#                                                                                                        
# Render the map.                                                                                        
my $img = $map->draw() or die('Unable to draw map');                                                     
#                                                                                                        
# Save the rendered image.                                                                               
my $void = $img->saveImage('example.png', $mapscript::MS_PNG, $map->{transparent}, $map->{interlace}, 0);

back to PerlMapScrip

Wiki pages Pages 355

Clone this wiki locally

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL