Re: [OpenMap Users] Use of OMRect (UNCLASSIFIED)

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 3 Aug 2007 16:11:59 -0400

Hi Mike,

On Jul 24, 2007, at 9:29 AM, Lackey, Michael B. ((SED/BTI)) wrote:

> Classification: UNCLASSIFIED
> Caveats: NONE
>
> Hello all,
>
> I have a question for the group.
>
> I am using an extended Layer to create some custom graphics. At the
> moment, very simple things like OMRect and OMScalingIcon.
>
> There is a behavior with OMRect that I would like to work around.
>
> Once placed, my layer's mouse listener will drag the rectangle around
> the screen. It moves the entire rectangle by moving each of the 4
> corners to current location plus some delta. As long as all 4
> sides of
> the rectangles remain inside the BsaicMapPanel, it works fine.
>
> But if I move the rectangle, such that either the left side or the top
> side are moved outside the BasicMapPanel, not only does the one side
> disappear, all fours sides disappear, and the entire OMRect
> disappears.
> Example, if grab the bottom of the rectangle, and push it upwards,
> such
> that the top line segment moves off the map panel, all 4 sides
> disappear.
>
> This does not happen when the right/bottom sides are moved off the map
> panel, it only happens when the top and/or left sides are moved off
> panel.
>
> It "would be nice" if there were a way to draw the remaining 3 sides
> that could be visible. Searched the list arvhice, but didn't find
> anything there.

I think there is something going on in your code, OMGraphics will
render themselves partially on a map. OMGraphics depend on Java to
do the clipping, and the projection libraries don't really care about
the pixel extents of the Map.




>
> The RENDER-TYPE is LAT-LON. I wonder if it's related to x/y coords
> becoming negative?

The projection class would handle negative pixel coordinates and
translate them into lat/lon space.


>
> I've thought about changing the class to draw four lines instead of an
> OMRect, but that would mean rewriting a blob of (tested and working)
> code, but more importantly I'm not sure that would work either. So I
> thought I'd ask before I start hacking and slashing.
>

If you want to send me your layer code, I'll take a look at it to see
if something jumps out at me.

- Don


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[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 Aug 03 2007 - 16:15:59 EDT

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