question: public synchronized OMGraphicList prepare ( ) { OMGraphicList list = new OMGraphicList ( ) ; Projection proj = getProjection ( ) ; if ( proj == null ) { return list ; } Point2D upperLeft = proj . getUpperLeft ( ) ; Point2D lowerRight = proj . getLowerRight ( ) ; if ( upperLeft . getX ( ) > lowerRight . getX ( ) ) { getPoints ( new DataBounds ( upperLeft , new Point2D . Double ( 180 , lowerRight . getY ( ) ) ) , list , proj ) ; getPoints ( new DataBounds ( new Point2D . Double ( - 180 , upperLeft . getY ( ) ) , lowerRight ) , list , proj ) ; } else { getPoints ( new DataBounds ( upperLeft , lowerRight ) , list , proj ) ; } OMText statement = new OMText ( 10 , proj . getHeight ( ) - 10 , getName ( ) + " displaying " + list . size ( ) + "/" + dataSource . size ( ) + " points" , OMText . JUSTIFY_LEFT ) ; statement . setFillPaint ( Color . gray ) ; statement . generate ( proj ) ; list . add ( 0 , statement ) ; return list ; }
target:  This is an important Layer method to override. The prepare method gets called when the layer is added to the map, or when the map projection changes. We need to make sure the OMGraphicList returned from this method is what we want painted on the map. The OMGraphics need to be generated with the current projection.