Re: [OpenMap Users] Transparency of OMGraphics - bug?

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Fri, 25 May 2012 10:44:46 -0400

Hi Daniel,

You might want to check out the com.bbn.openmap.layer.learn package, there's examples of creating layers where the OMGraphics are set once and don't change (BasicLayer), and when OMGraphics change based on the projection (ProjectionResponseLayer).

Hope this helps,

Don

- Don

=-=-=-=-=-=-=-=-=
Don Dietrick
_at_dfdietrick
=-=-=-=-=-=-=-=-=


On Friday, May 25, 2012 at 9:56 AM, Straub, Daniel wrote:

> Hello,
>
> You got the point!
>
> I used the prepare-method to create the OMGraphics because i thought it is only called once at startup.
> I debugged my program and saw new OMGraphics being placed with every change of the projection. Meaning with every zooming or moving of the map, my OMGraphics were placed again.
>
> I am now checking for that object does not already exist in the graphics-list before adding it.
>
> Much thanks for that hint, you saved me a lot of time!
> Daniel Straub
>
> From: Rob Ratcliff [mailto:rratcliff_at_ticom-geo.com]
> Sent: Friday, May 25, 2012 2:26 PM
> To: Straub, Daniel; openmap-users_at_bbn.com (mailto:openmap-users_at_bbn.com)
> Subject: RE: [OpenMap Users] Transparency of OMGraphics - bug?
>
> Sounds like the icon is being added to the layer after each paint. Is it possible you're adding multiple omgraphics at the same position and icon?
>
>
> Sent from my Samsung Galaxy Noteā„¢, an AT&T LTE smartphone
>
>
> -------- Original message --------
> Subject: [OpenMap Users] Transparency of OMGraphics - bug?
> From: "Straub, Daniel" <Daniel.Straub_at_cassidian.com (mailto:Daniel.Straub_at_cassidian.com)>
> To: openmap-users_at_bbn.com (mailto:openmap-users_at_bbn.com)
> CC: [OpenMap Users] Transparency of OMGraphics - bug?
>
>
> Hello,
> I've got a problem with OMGraphics as follows:
> When adding an OMGraphic to a OMGraphicHandlerLayer, having a transparent fill-color, the transparency is decreasing over time when projection changes (zoom in/out or move the map).
> For example a OMCircle with the fill-color yellow and an opaqueness of 15 (int) is added to a Layer. Layers underneath the circle can be seen and get a little touch of the circle's yellow. Then zooming a few times will result in a more and more opaque circle until no transparency is left.
> For setting the color i tried java.awt.Color and com.bbn.openmap.omGraphics.OMColor. Both with the same results.
> I use the following code:
> OMCircle testCircle = new OMCircle(0.0, 10.0, 20.0);
> testCircle.setFillPaint(new Color(255, 255, 0, 15)); // with 15 being the opaqueness
> testCircle.setSelectPaint(Color.YELLOW);
> testCircle.setLinePaint(Color.BLUE);
> graphics.add(testCircle);
> I'm using OpenMap 5.0.
> Does anyone know about this problem or how to solve it?
> Thanks in advance for any information or help.
> Daniel Straub



--
[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 May 25 2012 - 10:45:06 EDT

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