LabelFeature example

94 views
Skip to first unread message

diego

unread,
Nov 13, 2012, 4:19:32 AM11/13/12
to opensca...@googlegroups.com
Hi all. Does anybody have an example of use of LabelFeature?

TIA.

Diego.

Simon Lopez

unread,
Nov 15, 2012, 2:29:23 PM11/15/12
to opensca...@googlegroups.com
Hi,
you should use point with a text symbolizer.
Here an example :
var myStyle:Style =  new Style();
myStyle.rules.push(new Rule());
myStyle.rules[0].symbolizers.push(new TextSymbolizer("ATTRIBUTE_NAME", new Font(15,0xFFFFFF,0.7,null,Font.ITALIC,Font.BOLD)));

Regards,
Simon L.
--
You received this message because you are subscribed to the Google Groups "openscales-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openscales-dev/-/jyBDEhxcpBkJ.
To post to this group, send email to opensca...@googlegroups.com.
To unsubscribe from this group, send email to openscales-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openscales-dev?hl=en.

Diego Marrero

unread,
Nov 15, 2012, 2:37:04 PM11/15/12
to openscales-dev
Ok, thanks, I'll try it.

Regards.
Diego.


2012/11/15 Simon Lopez <simon...@ayolo.org>

Shonbh

unread,
Sep 6, 2013, 3:52:30 AM9/6/13
to opensca...@googlegroups.com
How to make offset for text symbolizer ?

Diego Marrero

unread,
Sep 6, 2013, 2:16:07 PM9/6/13
to openscales-dev
TextSymbolizer doesn't have properties for that. What I did was to extend  TextSymbolizer and create _xOffset and _yOffset properties. Then, modify the function drawTextField to update label.x  and label.y respectively. I'm sending you my version. You can use it as you like.

Regards.

Diego.



2013/9/6 Shonbh <son....@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to openscales-de...@googlegroups.com.

To post to this group, send email to opensca...@googlegroups.com.
CustomTextSymbolizer.as

son.ciren

unread,
Sep 7, 2013, 1:13:55 AM9/7/13
to opensca...@googlegroups.com
Tks very much!


Sent from Samsung Mobile

Shonbh

unread,
Sep 9, 2013, 6:30:51 AM9/9/13
to opensca...@googlegroups.com
It works perfectly ! Tks again !
Reply all
Reply to author
Forward
0 new messages