[Mapserver-users] Perl/Mapscript scalebar problem

Eric Bridger eric at gomoos.org
Fri Jun 25 15:57:55 EDT 2004


On Fri, 2004-06-25 at 15:36, Stephen Woodbridge wrote:
> Hi all,
> 
> I have a mapfile that works great in cgi mode and shows an embed 
> scalebar as defined in the mapfile.
> 
> When I use this same mapfile in a with Perl/mapscript the scalebar does 
> not display!
> 
> Is there something I have to do in mapscript to get the embedded 
> scalebar to show up on the map?
> 

Hi Stephen,
You have to do:

# embed scale bar in map img
my $scale_img = $map->drawScalebar();
$map->embedScalebar($scale_img);


You have to do either:
my $img = $map->prepareImage();
or
$img = $map->draw();

first.

Eric






More information about the mapserver-users mailing list