Re: creating new OMGraphic ...

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Oct 01 2002 - 09:42:18 EDT

Hi Christphe,

Check to make sure you are setting the projection in your layer.
getProjection() may be returning null if it is not being set. You can
call setProjection(ProjectionEvent) in the layer.projectionChanged()
method.

- Don

On Tuesday, October 1, 2002, at 09:29 AM, Christophe Turbout wrote:

>
> 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"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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:43:11 2002

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