mapscript.classObj

class mapscript.classObj(layer: layerObj | None = None)

Overview

The classObj has the following relationships:

../../../_images/classObj_hashTableObj.png ../../../_images/classObj_labelObj.png ../../../_images/classObj_layerObj.png ../../../_images/classObj_styleObj.png

Examples

Class creation:

lyr = mapscript.layerObj()
lyr.name = 'foo'
c = mapscript.classObj(lyr)
assert c.thisown == 1
assert c.layer.name == lyr.name
assert c.numstyles == 0

Attributes

debug

int TODO Add documentation

group

char TODO Add documentation

isfallback

int TODO Add documentation

keyimage

char TODO Add documentation

layer

layerObj immutable TODO Add documentation

leader

labelLeaderObj immutable TODO Add documentation

maxscaledenom

double TODO Add documentation

metadata

hashTableObj immutable TODO Add documentation

minfeaturesize

int TODO Add documentation

minscaledenom

double TODO Add documentation

name

char TODO Add documentation

numlabels

int immutable TODO Add documentation

numstyles

int immutable TODO Add documentation

refcount

int immutable TODO Add documentation

sizeunits

int TODO Add documentation

status

int TODO Add documentation

template

char TODO Add documentation

thisown

The membership flag

title

char TODO Add documentation

validation

hashTableObj immutable TODO Add documentation

Methods

__init__(layer: layerObj | None = None)[source]
addLabel(label: labelObj) int[source]
clone() classObj[source]
convertToString() char[source]
createLegendIcon(map: mapObj, layer: layerObj, width: int, height: int) imageObj[source]
drawLegendIcon(map: mapObj, layer: layerObj, width: int, height: int, dstImage: imageObj, dstX: int, dstY: int) int[source]
getExpressionString() char[source]
getLabel(i: int) labelObj[source]
getStyle(i: int) styleObj[source]
getTextString() char[source]
insertStyle(style: styleObj, index: int = -1) int[source]
moveStyleDown(index: int) int[source]
moveStyleUp(index: int) int[source]
removeLabel(index: int) labelObj[source]
removeStyle(index: int) styleObj[source]
setExpression(expression: char) int[source]
setText(text: char) int[source]
updateFromString(snippet: char) int[source]