Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add TextSymbolizer.name in python bindings.

Refs #1482.
  • Loading branch information...
commit f27578d41ca1b01ad0cc8a93a15d3d2daf236132 1 parent d617403
@herm herm authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 bindings/python/mapnik/__init__.py
View
12 bindings/python/mapnik/__init__.py
@@ -699,6 +699,18 @@ def make_it(feat, idx):
class _TextSymbolizer(TextSymbolizer,_injector):
@property
+ def name(self):
+ if isinstance(self.properties.format_tree, FormattingText):
+ return self.properties.format_tree.text
+ else:
+ return None # This text symbolizer is using complex formatting features.
+ # There is no single expression which could be returned as name
+
+ @name.setter
+ def name(self, name):
+ self.properties.format_tree = FormattingText(name)
+
+ @property
def text_size(self):
warnings.warn("'text_size' is deprecated, use format.text_size",
DeprecationWarning, 2)
Please sign in to comment.
Something went wrong with that request. Please try again.