[mapserver-users] Perl/Mapscript

imap at chesapeake.net imap at chesapeake.net
Tue Oct 2 22:24:46 PDT 2001


Steve,

I sent Paul an email directly but should have posted to the
list.  MapScript objects and methods are documented by
the swig output file "mapscript_wrap.doc".  That bit of
documentation is a *must read* for the perl mapscript
programmers out there.   At least it was a big help for
me determining the changes that have occurred between
3.3 and 3.5.   It provides a bit of extra detail
about members, etc. that not found in the HTML 
MapScript Reference docs.

Regards,

Chris



Stephen Lime wrote:
> 
> These are all correct. Image color is set like this:
> 
>   $map->{imagecolor}->{red} = 233;
> 
> and so on for the green and blue components. This is different from other
> colors because of how a palette is built for an image. The image color is
> allocated when the image is created and we need to keep the 3 components.
> 
> Projection objects cannot be manipulated directly. There is a helper
> method (setProjection) that takes a string of Proj.4 commands as input.
> That method is available in layerObj and mapObj. There is also a projObj
> contructor and methods to do projections. The projection object is new for
> 3.5, previously being handled through seperate modules.
> 
> Extents are better documented. Use $map->{extent}->{minx} and so on to
> access those members.
> 
> Steve
> 
> Paul Ramsey wrote:
> 
> > Interesting something happening with the perl binding:
> >
> > $map->{imagecolor} returns a colorObj, which is a standard hash
> > reference. mapscript::colorObj=HASH(0x82195c4)
> >
> > $map->{projection} returns a projectionObj, which is a SCALAR reference
> > for some reason. mapscript::projectionObj=SCALAR(0x83bb834)
> >
> > Similarly, $map->{extent} returns a rectObj, which is also a scalar
> > reference.
> > I have no idea what to do with these scalar references. Anyone have any
> > light they can shine?



More information about the MapServer-users mailing list