Re: [OpenMap Users] Visibility and OMScalingRaster

From: Don Dietrick <>
Date: Fri, 24 Sep 2004 16:28:57 -0400

Hi Peter,

The next version of OMGraphicList does take visibility into account,
and also has a flag that lets you ignore visibility if you need that
functionality, too.

- Don

On Sep 24, 2004, at 4:11 PM, Peter Solderitsch wrote:

> Thanks Don. It was really confusing to me for awhile trying to figure
> out what was going on.
> In a related visibility issue, the default MapMouseInterpreter doesn't
> take into account whether a graphic in a list is visible or not inside
> getGeometryUnder(). I had to override that method for other reasons,
> so
> I went ahead and added that check since that's the behavior I want (in
> my case, a user shouldn't be able to 'click' on a graphic that's
> invisible).
> It's arguable whether this modification would be better made in
> OMGraphicList's "findClosest()" method - and the more I think about it,
> the more I feel it should be: Suppose there were 2 overlapping graphics
> positioned in the OMGraphicList, with one of them invisible. (It's
> quite
> possible in the application I'm working on for this to happen
> frequently). If findClosest() happens to return the invisible graphic,
> there would NEVER be a way to click on the (correct) visible one,
> because it would never be found as the 'closest'.
> -Peter
> -----Original Message-----
> From: Don Dietrick []
> Sent: Friday, September 24, 2004 4:03 PM
> To: Peter Solderitsch
> Cc:
> Subject: Re: [OpenMap Users] Visibility and OMScalingRaster
> Hi Peter,
> Thanks for pointing this out. I actually think it's wrong that the
> visibility is changed at all. Instead, the internal bitmap image
> should be set to null if the scaled image doesn't overlap with the
> projection window, which would signal the superclass render method to
> not bother trying to render it.
> The problem with using the visibility variable is that if the layer
> author makes an OMScalingRaster invisible for some reason, and the
> OMScalingRaster is offscreen, when it comes back on screen it will be
> made visible again automatically, even though the author didn't change
> the visibility setting.
> I've made the change and tested it, I'm going to be updating the
> repository shortly.
> - Don
> On Sep 24, 2004, at 2:05 PM, Peter Solderitsch wrote:
>> All,
>> Apologies if this has been brought up before, but I didn't see
>> anything about it in the mailing list archives.
>> I believe that OMScalingRaster (and its subclasses, like
>> OMScalingIcon) have a bug that prevents objects of that type to ever
>> be successfully set as invisible.
>> I've been trying to track down behavior where I would set an
>> OMGraphicList as invisible, and all the graphics in the list except
>> for the scaling rasters would be correctly invisible, but the rasters
>> remained on screen. Doing some digging, it looks to me like the
>> scaleTo(Projection) method in does not make an
>> attempt to preserve the visibility set on the graphic prior to the
>> scaleTo() method being called; rather, it always sets visibility to
>> 'true'.
>> I fixed my immediate need by subclassing OMScalingIcon (which was the
>> class I was using), and overriding scaleTo() to first remember the
>> prior visibility state, and then re-set the visibility after the
>> super.scaleTo() has been called. However, I believe this is probably
>> a
>> good candidate to get fixed in the main source branch.
>> Thanks,
>> -Peter
>> --
>> [To unsubscribe to this list send an email to "" with
>> the following text in the BODY of the message "unsubscribe
>> openmap-users"]
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick,
> BBN Technologies, Cambridge, MA =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Sep 24 2004 - 16:29:33 EDT

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