perl mapscript and reference map

Lowell Filak lfilak at MEDINACO.ORG
Thu Jul 21 08:16:09 EDT 2005


The following message was sent by Jachym Cepicky
<jachym.cepicky at CENTRUM.CZ> on Thu, 21 Jul 2005 11:43:53 +0200.

> Hallo,
> I would like to make reference map with help of perl mapscript.
> 
> If I understand it well, I must do following steps:
>     
>     1) Initialize the mapfile (what I need to do anyhow)
>     my $mapObj = new mapscript::mapObj("/path/to/mapfile.map") or
die("$mapscript::ms_error->{message}");
>     
>     2) Create the refMapObject:
>     my $refImgObj = $mapObj->drawReferenceMap();
> 
>     3) Save it to disk and display it:
>     $refImgObj->save("/path/to/web/images/refmap.png");
> 
> The reference map is there, however the current region borders are not
> showen.
> 
> The mapfile part follows:
> 
> REFERENCE
>     IMAGE '/var/www/grassserv/imgs/krtiny_ref.gif'
>     EXTENT -600069.70837995 -1160066.78650493  -581069.87592698 
-1142015.20262403  
>     OUTLINECOLOR 000 255 000
>     COLOR -1 -1 -1
>     SIZE 120 120
>     STATUS ON
> END
> 
> Do I need to draw the region extend to to $refImgObj "manualy"?

Jachym,

You must also verify that the extents of the 'map' are set properly.

Lowell



More information about the mapserver-users mailing list