public synchronized OMGraphicList prepare(){
  OMGraphicList list=getList();
  if (list != null) {
    list.clear();
  }
 else {
    list=new OMGraphicList();
  }
  if (spatialIndex == null)   return list;
  try {
    if (bufferedList == null) {
      bufferedList=getWholePlanet();
    }
  }
 catch (  FormatException fe) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(fe.getMessage());
    }
    return list;
  }
catch (  IOException ioe) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(ioe.getMessage());
    }
    return list;
  }
  Projection proj=getProjection();
  Point2D ul=proj.getUpperLeft();
  Point2D lr=proj.getLowerRight();
  double ulLat=ul.getY();
  double ulLon=ul.getX();
  double lrLat=lr.getY();
  double lrLon=lr.getX();
  try {
    if (ProjMath.isCrossingDateline(ulLon,lrLon,proj.getScale())) {
      if (logger.isLoggable(Level.FINE)) {
        logger.fine(getName() + ": Dateline is on screen");
      }
      double ymin=Math.min(ulLat,lrLat);
      double ymax=Math.max(ulLat,lrLat);
      checkSpatialIndexEntries(ulLon,ymin,180.0d,ymax,list,proj);
      checkSpatialIndexEntries(-180.0d,ymin,lrLon,ymax,list,proj);
    }
 else {
      double xmin=Math.min(ulLon,lrLon);
      double xmax=Math.max(ulLon,lrLon);
      double ymin=Math.min(ulLat,lrLat);
      double ymax=Math.max(ulLat,lrLat);
      checkSpatialIndexEntries(xmin,ymin,xmax,ymax,list,proj);
    }
  }
 catch (  FormatException fe) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(fe.getMessage());
    }
  }
catch (  IOException ioe) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(ioe.getMessage());
    }
  }
  return list;
}

public synchronized OMGraphicList prepare ( ) { OMGraphicList list = getList ( ) ; if ( list != null ) { list . clear ( ) ; } else { list = new OMGraphicList ( ) ; } if ( spatialIndex == null ) return list ; try { if ( bufferedList == null ) { bufferedList = getWholePlanet ( ) ; } } catch ( FormatException fe ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( fe . getMessage ( ) ) ; } return list ; } catch ( IOException ioe ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( ioe . getMessage ( ) ) ; } return list ; } Projection proj = getProjection ( ) ; Point2D ul = proj . getUpperLeft ( ) ; Point2D lr = proj . getLowerRight ( ) ; double ulLat = ul . getY ( ) ; double ulLon = ul . getX ( ) ; double lrLat = lr . getY ( ) ; double lrLon = lr . getX ( ) ; try { if ( ProjMath . isCrossingDateline ( ulLon , lrLon , proj . getScale ( ) ) ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( getName ( ) + ": Dateline is on screen" ) ; } double ymin = Math . min ( ulLat , lrLat ) ; double ymax = Math . max ( ulLat , lrLat ) ; checkSpatialIndexEntries ( ulLon , ymin , 180.0d , ymax , list , proj ) ; checkSpatialIndexEntries ( - 180.0d , ymin , lrLon , ymax , list , proj ) ; } else { double xmin = Math . min ( ulLon , lrLon ) ; double xmax = Math . max ( ulLon , lrLon ) ; double ymin = Math . min ( ulLat , lrLat ) ; double ymax = Math . max ( ulLat , lrLat ) ; checkSpatialIndexEntries ( xmin , ymin , xmax , ymax , list , proj ) ; } } catch ( FormatException fe ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( fe . getMessage ( ) ) ; } } catch ( IOException ioe ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( ioe . getMessage ( ) ) ; } } return list ; }
this overridden method checks to see if the buffered omgraphiclist is created , and then returns a subset of omgraphics that are actually on the map . if the buffered omgraphiclist hasn ' t been created yet , it gets created here .
