[OpenMap Users] FW: Open map bug with OMCircle???

From: Stevens, Neil <neil.stevens_at_goodrich.com>
Date: Tue, 16 Oct 2007 09:50:08 +0100


Sometimes I've noticed an OMCircle is not displayed when it is centered
in the top right quarter of the map displayed. The attached example
illustrates this. It should draw lots of red circles centred around the
point (40, 30). However any circles with a radius of between 50 and 130
degrees are not drawn when this example is run.

I have noticed that an OMCircle is not displayed if

 1) It is centred in the top right quarter of the visible map.
 2) It has a radius greater than 90 minus centre point latitude
 3) It has a radius less than 90 plus centre point latitude
 Alternatively use the openmap executable program and try drawing a
circle centred in the top right quarter. The same problem occurs with
the circle not being displayed.
 I am using windows XP with java 1.6 and openmap 4.6.3
 import java.awt.Graphics2D;
 import javax.swing.JFrame;
 import com.bbn.openmap.*;
 import com.bbn.openmap.layer.GraticuleLayer;
 import com.bbn.openmap.proj.*;
 import com.bbn.openmap.omGraphics.*;
 public class BasicMapFrame extends JFrame {
   // The Map bean
   private BufferedLayerMapBean mapBean = new BufferedLayerMapBean();
   // initialises the map bean and displays it in a frame
   public BasicMapFrame()
     // add openmap bean to frame
     this.setSize(800, 600);
     //initialise openmap stuff
     MapHandler mapHandler = new MapHandler();
         mapHandler.add(new LayerHandler());
         mapHandler.add(new GraticuleLayer());
   // creates a new BasicMapFrame and paints circles on it
   public static void main(String args[]) throws Exception
     BasicMapFrame frame = new BasicMapFrame();
     // wait 2 seconds then paint the circles
   // should paint read circles around the point (40,30)
   public void paintCircles(){
     Graphics2D graphics2d = (Graphics2D)mapBean.getGraphics();
     // paint red circles centre around the point (40, 30)
     final float circleCentreLatitude = 40;
     final float circleCentreLongitude = 30;
     for(float circleRadius = 0; circleRadius < 180; circleRadius +=1)
       OMCircle circle = new OMCircle(circleCentreLatitude,
   private void setMapProjection()
     Projection currentProjection = mapBean.getProjection();
     CADRG cadrgProjection = new CADRG(currentProjection.getCenter(),

Has any one else come across this bug and does any one know of a work
around for this to make the circle appear?

Thanks in advance for any help you can give me


Rosemount Aerospace Limited.
Registered Office: Stratford Road, Solihull, West Midlands, B90 4LA.
Registered in England No. 02849033.


[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 Tue Oct 16 2007 - 05:16:19 EDT

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