Creation of layer object in Python Mapscript

Yao Heling yaoheling at YAHOO.COM
Thu Oct 28 13:19:23 EDT 2004


On Thu, Oct 28, 2004 at 09:55:45AM -0600, Bill
Hudspeth wrote:
> 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
>

Try the following to get a new layer (I dont' know if
this is the
correct way to do it though):

map1 = mapscript.mapObj()
new_layer = mapscript.layerObj(map1)

Hope that helps,

Joseph H. Yao




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail



More information about the mapserver-users mailing list