[Mapserver-users] 3.7 python/mapscript, styles

Jerritt Collord collord at linuxfund.org
Fri Apr 18 23:03:07 EDT 2003


Hi all.

I'm plugging away at a python/mapscript project and can't find reference
to how to manipulate styles. I'm trying to change the color that a layer
renders as.

(...snip... load a mapfile... thislayname is a layer defined there that
has one class which contains one style...)

  thislay = mymap.getLayerByName(thislayname)
  thisclass = mapscript.classObj(thislay)
  thiscolor = mapscript.colorObj()
  thiscolor.red,thiscolor.green,thiscolor.blue = (red,green,blue)
  thisclass.numstyles=1
  thisclass.styles.color = thiscolor

(...)

But I can't get the color of the features to change.

Any tips or example code out there?

Thanks,

Jerritt




More information about the mapserver-users mailing list