Set symbol in python mapscript

Rob McCulley RMcCulley at COUNTY24.COM
Mon Sep 11 13:01:20 EDT 2006


Hi All,

 

I'm creating a new layer in python mapscript, but I can't figure out how
to set the symbol for that layer.

 

I add my layer using:

 

newLyr = mapscript.layerObj(projMap)

newLyr.name = 'Project ' + projNum

newLyr.type = mapscript.MS_LAYER_LINE

newLyr.data = shpfilePath

 

I can create class and style for my newLyr using:

 

newCls = mapscript.classObj(newLyr)

newStyle = mapscript.styleObj(newCls)

 

I can access my symbolset, and I know my desired symbol is at index 8.
What I can't figure out is how to make my new layer draw using the
symbol from index 8.

 

 

Rob McCulley

GIS Coordinator

County of Vermilion River No. 24

(780) 846-2244

www.vermilion-river.ab.ca

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060911/0830a709/attachment.html


More information about the mapserver-users mailing list