Creation of layer object in Python Maps cript

Ryan, Adam ARyan at CO.LINN.OR.US
Thu Oct 28 10:25:24 PDT 2004


> -----Original Message-----
> From: Sean Gillies [mailto:sgillies at frii.com]
> Sent: Thursday, October 28, 2004 10:15 AM
> To: Ryan, Adam
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: Creation of layer object in Python Maps cript
>
>
> On Oct 28, 2004, at 11:03 AM, Ryan, Adam wrote:
>
> >> -----Original Message-----
> >> From: Bill Hudspeth [mailto:bhudspeth at EDAC.UNM.EDU]
> >> Sent: Thursday, October 28, 2004 8:56 AM
> >> To: MAPSERVER-USERS at LISTS.UMN.EDU
> >> Subject: [UMN_MAPSERVER-USERS] Creation of layer object in Python
> >> Mapscript
> >>
> >>
> >> Hello,
> >>
> >> I want to write new map layers on the fly in my scripting. I have
> >> found the reference to "new layerObj()" in the
> documentation, but am
> >> unsure of how to write the exact syntax. Haven't had any luck with
> >> "new_layer=layerObj(mapObj)".
> >>
> >> Any help greatly appreciated.
> >>
> >> Bill
> >>
> >
> > Hi Bill,
> >
> > I'm working on the same thing 'bout now.
> > For me, this crashes Python:
> >
> >     layerO = mapscript.layerObj(mapO)
> >
> > But this works OK:
> >
> >     layerO = mapscript.layerObj()
> >     mapO.insertLayer(layerO)
> >
> > However, if I then check layerO.index, I get 1634300513.
> That's a lot
> > of
> > layers.
> >
> > If I check mapO.getLayersDrawingOrder(), I get _30fc8200_p_int.  Is
> > this a
> > typemap issue?
> >
> > If I try layerO.promote() or layerO.demote(), I'm told those methods
> > don't
> > exist.
> >
> > I'm still trying to figure this one out.  Let me know if
> you make any
> > headway.
> >
> > Adam
> >
> >
>
> Which version of mapserver are y'all using?
>
> Sean
>

I pulled mapscript-4.4.0_beta1.win32-py2.3.exe from Howard Butler's
http://hobu.stat.iastate.edu/mapserver/build_output/beta_4_4_0/ site.

Adam



More information about the MapServer-users mailing list