Hi JayDub,
Do you call generate(Projection) on the OMGraphics after you add the
OMTextLabelers, but before you paint? That should happen in the
method below before you return the list:
On Sep 14, 2009, at 9:32 AM, JayDub wrote:
>
> Any one help me with this?
>
>
> JayDub wrote:
>>
>> Hi all, I override the SHP layer to add OMTextLabeler's. I see them
>> when
>> zooming but they disappear after the layer is fully painted.
>>
>> _at_Override
>> public synchronized OMGraphicList prepare() {
>> OMGraphicList graphicList = super.prepare();
Projection proj = getProjection();
>> for(int i = 0; i < graphicList.size(); i++){
>> OMGraphic graphic = graphicList.getOMGraphicAt(i);
>> OMTextLabeler label = new OMTextLabeler("SOME
>> TEXT",OMText.JUSTIFY_RIGHT);
>> graphic.putAttribute(OMGraphicConstants.LABEL, label);
graphic.generate(proj);
>> }
>> return graphicList;
>> }
>>
>>
Otherwise, the labels never get told where to render themselves.
-Don
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Sep 14 2009 - 09:40:24 EDT