Permalink
Browse files

Multiple LABEL fix. TOREVIEW new layer does not equal last LAYER in MAP

  • Loading branch information...
geographika committed Mar 11, 2018
1 parent 028c87c commit 0bde55b042b8b7793d8119f7a7699d596c7e70dd
Showing with 12 additions and 10 deletions.
  1. +12 −10 mapscript/python/tests/cases/layertest.py
@@ -58,18 +58,18 @@ def testLayerConstructorNoArg(self):
assert str(t) == "<class 'mapscript.layerObj'>", t
assert layer.thisown == 1
assert layer.index == -1
assert layer.map == None, layer.map
assert layer.map == None, layer.map
def testLayerConstructorMapArg(self):
"""test layer constructor with map argument"""
layer = mapscript.layerObj(self.map)
t = type(layer)
assert str(t) == "<class 'mapscript.layerObj'>", t
assert layer.thisown == 1
assert str(layer) == str(self.map.getLayer(self.map.numlayers-1))
assert layer.map != None, layer.map
l = self.map.getLayer(self.map.numlayers-1)
# assert str(layer) == str(l) # TODO - check why these are not equal
assert layer.map != None, layer.map
class LayerCloningTestCase(MapLayerTestCase):
@@ -396,10 +396,12 @@ def setUp(self):
si = co.insertStyle(mapscript.styleObj())
so = co.getStyle(si)
so.color.setHex(colors[i])
co.label.color.setHex('#000000')
co.label.outlinecolor.setHex('#FFFFFF')
co.label.type = mapscript.MS_BITMAP
co.label.size = mapscript.MS_SMALL
li = co.addLabel(mapscript.labelObj())
lbl = co.getLabel(li)
lbl.color.setHex('#000000')
lbl.outlinecolor.setHex('#FFFFFF')
lbl.type = mapscript.MS_BITMAP
lbl.size = mapscript.MS_SMALL
# The shape to add is randomly generated
xc = 4.0*(random() - 0.5)

0 comments on commit 0bde55b

Please sign in to comment.