Use the issues queue here to ask questions and offer help on using Mapnik (maybe if this works well we can retire the mailing list at http://mapnik.org/contact/?)
6
stars
6
forks
source link
C++ Text Symbolizer and checking label_placement #127
Hi!
I am trying to print out the set values of various symbolizers and am having a hard time with getting enum as string from the TextSymbolizer. I would appreciate a nudge in the right direction as I have read through the mapnik code but I think I still don't fully understand this.
When I try getting a value that has previously been set in TextSymbolizer and label_placement, the resulting enum is always the default one (point), no matter to what I set it beforehand.
Setting it up:
The above code prints "point", even though I have set the value to "line" before. I assume the value is set correctly, since it renders the correct placement in the output file.
I also tried getting the value through the _text_placementsptr, but I am not sure how to convert the _symbolizer_base::valuetype into anything useful.
I had no trouble getting and printing the enum from MarkersSymbolizer like so :
Hi! I am trying to print out the set values of various symbolizers and am having a hard time with getting enum as string from the TextSymbolizer. I would appreciate a nudge in the right direction as I have read through the mapnik code but I think I still don't fully understand this.
When I try getting a value that has previously been set in TextSymbolizer and label_placement, the resulting enum is always the default one (point), no matter to what I set it beforehand. Setting it up:
Trying to get the set value back:
The above code prints "point", even though I have set the value to "line" before. I assume the value is set correctly, since it renders the correct placement in the output file.
I also tried getting the value through the _text_placementsptr, but I am not sure how to convert the _symbolizer_base::valuetype into anything useful.
I had no trouble getting and printing the enum from MarkersSymbolizer like so :
Any help with this would be much appreciated, thank you!