Re: [OpenMap Users] OpenMap Layer (New)

From: JR Andreassen <>
Date: Tue, 28 Nov 2006 10:23:07 -0600

It's been a while since worked on it(a month or two). I've been
retasked until about mid-December.
Where I left it off, I was having problems with the rotations.
It would take me a little time to get you a sample. I was planning on
making it work and posting the
code. the only problem is when.
What I did to get the labels was a bit of a hack.
In 'com.bbn.openmap.dataAccess.shape.DrawingAttributesUtility' constructor
        value = (Integer) columnNames.get(SHAPE_DBF_DESCRIPTION);
//--- Changed by JR-----------------------------
        if (value == null)
                { value = (Integer) columnNames.get("NAME");}
        if (value != null)
            desColumn = value.intValue();
Change the Column Name to whatever you want or change your Column name
to SHAPE_DBF_DESCRIPTION ("Description").
Then, change:
    protected void configureForRecord(OMGraphic graphic, ArrayList record) {
        if (desColumn != -1) {
            String ret = (String) record.get(desColumn);
//--- Changed by JR-----------------------------
// if (graphic.getAppObject() == null) {
// graphic.setAppObject(ret);
// OMTextLabeler omtl = new
OMTextLabeler(ret, OMText.JUSTIFY_CENTER);
// }
graphic.putAttribute(OMGraphicConstants.LABEL, new
OMTextLabelerTracing(graphic, ret, OMText.JUSTIFY_CENTER));

graphic.putAttribute(OMGraphicConstants.LABEL, new
com.bbn.openmap.omGraphics.OMTextLabeler(ret, OMText.JUSTIFY_CENTER));
//--- Changed by JR-----------------------------

I was hoping to get a request for change through to pass the label the
object eeing labeled so that it could arrange itself.
Anyways, when I get back to it I'll post the solutions...

>Hi JR,
>Could you explain how you are getting the names to show up? I've been
>using an OMTextLabeler to do this but the location names only show up
>when I mouse over them and disappear when I resize the screen. Could you
>possibly post a small amount of sample code to illustrate how you did
>this? Thank you very much.
>Jeff Storey
>-----Original Message-----
>From: []
>On Behalf Of JR Andreassen
>Sent: Monday, November 27, 2006 3:15 PM
>To: oland
>Subject: Re: [OpenMap Users] OpenMap Layer (New)
>Hi Carsten.
> 1. As far as the decluttering, I was going to leave that to the
> I looked at the link and the NLPF stuff.
> From your posting i didn't get wether that got integrated.
> 2. I did some experiments with the rotation angle, it slows the drawing
>of the objects to a crawl.
> This is partially due to the Shape layer/plugin don't filter out all
>the things that are not in the projection(unless I missed something).
> So, quite a few issues to work out.
> Thanks for the input.
> JR
>>Hi JR
>>1. To do this properly you will need to use some decluttering mech. I
>>Take a look at
>>2. Maybe you can use some of the stuff from OMText. Look for
>>JR Andreassen wrote:

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Nov 28 2006 - 11:24:25 EST

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