Re: [OpenMap Users] OMTextLabeler question

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 15 Nov 2007 16:25:38 -0500

Hi John,

Looks OK to me, what kind of OMGraphic are you using? I don't think it
works for an OMGraphicList, because the OMTextLabeler piggybacks on the
projected location of the OMGraphic, and the OMGraphicList doesn't
really know where its OMGraphics are.

- Don

Graham, John wrote:
>
> Hi,
>
> I am using the following code to add a text label (HASC code string)
> to an OMGraphic:
>
> ...
> OMTextLabeler tl = new OMTextLabeler(hasc_code,
> OMTextLabeler.JUSTIFY_CENTER);
> FontSizer fs = new FontSizer(new java.awt.Font("Arial",
> java.awt.Font.PLAIN, 8), 275158.16f, 1, 5, 32);
> tl.setFontSizer(fs);
> omg.putAttribute(OMGraphicConstants.LABEL, tl);
> …
>
> My problem is, the text label is never getting displayed. I removed
> the FontSizer to see if that was the issue…it wasn't.
>
> I tried repainting the layer, which is an AreaShapeLayer. I also tried
> adding the OMTextLabeler object to the OMGraphicList but that didn't
> work either.
>
> Any ideas on what I might be doing wrong?
>
> Thanks,
> John
>

--
[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 Thu Nov 15 2007 - 16:26:04 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT