[mapserver-users] PERL MapScript
Christopher Condit
condit at sdsc.edu
Wed May 20 10:56:01 PDT 2009
Hi Tom-
Very strange. I don't see an xml file but now I've tried this and I do
get an instance of an imageObj back:
my $map = new mapscript::mapObj('test.map') or die "no map $!";
$map->saveMapContext('test.xml');
my $image = $map->draw();
print $image;
So I guess I'll proceed and see how things go. Thanks for your input.
-Chris
> -----Original Message-----
> From: Kralidis,Tom [Ontario] [mailto:Tom.Kralidis at ec.gc.ca]
> Sent: Tuesday, May 19, 2009 4:58 PM
> To: Christopher Condit; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] PERL MapScript
>
>
> I get the same error when running mapObj->get("name"). I don't see
any
> get() method in mapObj. From my example, you should see a out2.xml
> file written to disk.
>
> ..Tom
>
>
>
> -----Original Message-----
> From: Christopher Condit [mailto:condit at sdsc.edu]
> Sent: Tue 19-May-09 19:45
> To: Kralidis,Tom [Ontario]; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] PERL MapScript
>
> Hi Tom-
> > What does your code look like? The following works for me:
> #!/usr/bin/perl
> use mapscript;
> use strict;
>
> my $map = new mapscript::mapObj("test.map") or die "no map $!";
> my $name = $map->get("name");
> print $name;
>
> > #!/usr/bin/perl
> >
> > use strict;
> > use warnings;
> > use mapscript;
> >
> > my $map = new mapscript::mapObj('test.map');
> > $map->saveMapContext('out2.xml');
>
> I also tried running your code. It doesn't generate an error but no
> test.xml file is created...
>
> Any thoughts?
> Thanks,
> -Chris
>
>
More information about the MapServer-users
mailing list