Re: [OpenMap Users] adding OMGraphics on the fly

From: SteveC <>
Date: Tue, 7 Dec 2004 19:30:13 +0000

* Don Dietrick ( wrote:
> You need to call generate(Projection) on the OMGraphic, the other
> OMGraphics should be OK if the map isn't changing.

So this *should* work (see below). Its what I'm using, it lives in my
Layer class. When a line is added that layer disappears. resizing the
window makes it come back with the added line.


public void setLine(LatLonPoint a, LatLonPoint b)
    System.out.println("adding line "+
        +a.getLongitude() + " "
        +b.getLatitude() + ","

    OMLine l = new OMLine(


    graphics.add( l);

    graphics.generate( getProjection(), true);



} // setLine

have fun,

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Dec 07 2004 - 14:35:51 EST

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