question about perl mapscript interface

Sean Gillies sgillies at FRII.COM
Sat Nov 13 21:06:02 EST 2004


On Nov 13, 2004, at 6:42 PM, Joseph Norris wrote:

> Group,
>
> I have my first test scripts working producing a map  from a mapfile
> using
> the mapObj.  My question is:
>
> How do a pull in the shape that is in the map file and add a polygon
> point
> to the shape at a give location on the map.
>
> I have played with addPoint, shapeObj etc.. but I see no change in my
> map.
>
>
> Here is what I have so far:
>
>    my $gif_file = 'tttt.gif';
>     my $mapfile_loc =
> "/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/
> teacher";
>     my $mapfile_data = "$mapfile_loc/tdata";
>     my $mapfile = "$mapfile_loc/cal.map";
>     my $map = new mapscript::mapObj($mapfile);
>     my $image = $map->draw();
>
>     my $file_location =
> '/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/tmp';
>
>     unlink "$file_location/$gif_file";
>     mapscript::msSaveImage($map, $image, "$file_location/$gif_file");
>
>
> thanks.
>
> #Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print
> @c=map chr
> $_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,
> -1,7,1,14,-
> 68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
>

I see from the last line of your script that you are using
an ancient version of mapserver?  3.5 or 3.6?

You should really try out the newer versions available from
the website.  We developers would be very grateful if you
would try the 4.4.0 beta version.  The beta also contains
some API documentation in mapserver/mapscript/doc/mapscript.txt.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the mapserver-users mailing list