Re: [OpenMap Users] Re: Issues with Drawing Layers

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 13 Jun 2008 19:06:52 -0400

Hi Shawn,

Shawn McNaughton wrote:
> I've been looking into my issues a bit further, and my implmentation is
> down to three main issues. I was able to work around one of the
> previous issues, however.
> The first one ("Whenever I zoom out too far, I get a blank map display,
> or one that only has the very edges drawn on."), I'm forcefully limiting
> the scale of the map. I can't use the Proj class Max scale, because on
> MapBean resize it recalculates. It seems to be giving a value that is
> just too large, but I'm not sure. My 'hack' is to add a projection
> listener, and whenever the size of the MapBean changes, take the
> 'maxscale' it calculates and multiply it by .96. Not perfect, so I'm
> open to suggestions.

I've not seen this. Does it happen for all projection types?

The max scale basically limits the scale of the map so no more than 360
degrees are shown on the map at a time. But, if you hit the limit
during a projection change, the scale should be set to the max scale and
the layers should respond accordingly. I can't think of a reason why
the layers wouldn't render, however, if the max scale were to be
circumvented the layers would still render.

>
> The remaining issues I have are:
> (1) Repaint on resize: Our map is in a JInternalFrame, and it has an
> issue - most prevalent on Solaris - in which if I resize the frame down,
> the map appears to redraw once at the old size. I say redraw because the
> JInternalFrame border fixes itself. If I force a redraw by moving any
> JInternalFrame over the affected area, that are covered by the
> replacement component is fixed. My next step on this issue is to add a
> ComponentListener to the InternalFrame and try a revalidate() on the
> desktop - I've tried this with repaint to no avail.

What is the component architecture in the JInternalFrame? Are you
adding a MapBean directly, or are you using a BasicMapPanel or JPanel?

Again, I've not see this, but I haven't really run with a MapBean in a
JInternalFrame either.

> (2) Occasionally, Top-Most layers won't draw: Sometimes, when the bean
> is created, it simply doesn't draw the top most layers. There's really
> no rhyme or reason, and on average it appears to be 1-3 layers, but
> there is no console entry. Often, at least one of these is a custom
> AbstractPlugIn.

Do they ever draw, after projection changes, etc? Do they draw if you
add/remove a layer to/from the map?

> (3) Layer ordering: Also much more prevalent on Solaris, but I've seen
> it on Linux as well. I can't seem to get OpenMap to ensure the order in
> which layers are stacked programatically. At first, I thought it was the
> order they were added. I've now moved on to using
> layerHandler.moveLayer(), which works better, but still doesn't work. I
> assumed 0 for the lowest layer (for example, WMS) and higher numbers get
> drawn on top. Is this right? Is there something else I'm missing?

0 is the top layer.

What is the configuration of your OpenMap components? I mean, what
components are you using to configure the map, and how? Are you using
the MapHandler inside a BasicMapPanel, or are you trying to hook
everything up yourself?

Regards,

Don


>
> Any other bugs I've got pretty easily tracked back to my own code. :)
>
> Any help is greatly appriciated!
>
> Shawn
>
> --
> Shawn McNaughton
> Software Engineer I, Raytheon IIS State College -
> Shawn_G_McNaughton_at_raytheon.com <mailto:Shawn_G_McNaughton_at_raytheon.com>

--
[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 Fri Jun 13 2008 - 19:07:38 EDT

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