creating new OMGraphic ...

From: Christophe Turbout <Christophe.Turbout@info.unicaen.fr>
Date: Tue Oct 01 2002 - 09:29:48 EDT

hi,

I've solve my last problem (Disabling dragging feature, return false
instead of true (my BUG)), but I'have a new one

In FAQ or API, builduing OMGraphic needs first to create it, second to
generate it and third to render it.

The trouble come from generate method which return ALWAYS false !!!

here is my paint method :

    public void paint(Graphics g) {

        // an OMGraphic List from another part of the layer
        OMGraphicList omgl = getOMGraphic(getProjection());

        if (omgl!=null) {
          OMCircle circle = new OMCircle(46f,-5f,10,10);
          circle.setRotationAngle(90);
          circle.setLinePaint(Color.green);
            
          if (circle.generate(getProjection())) {
            System.out.println("circle created");
            omgl.add(circle);
          }
          else System.out.println("can't create circle");

          omgl.render(g);
        }
    }

any idea ???

-- 
Christophe Turbout    tel : +33 (0)2 31 56 72 43
CERTIC, GREYC Info    fax : +33 (0)2 31 56 73 30
Université de Caen    icq : 125927589     
Campus II - S3-360    http://certic.info.unicaen.fr
Bd M. Juin - BP 5186  http://www.info.unicaen.fr/~turbout/
F 14032 CAEN CEDEX    email : Christophe.Turbout@info.unicaen.fr
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Oct 1 09:32:50 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT