perl mapscript and reference map

Jachym Cepicky jachym.cepicky at CENTRUM.CZ
Thu Jul 21 02:43:53 PDT 2005


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"?

Thank you

Jachym

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/



More information about the MapServer-users mailing list