Debug.message("dted",
getName()
+ "|DTEDFrameCacheLayer can't add anything to map because the DTEDFrameCache has not been set.");
}
Projection projection = getProjection();
if (projection == null) {
Debug.output("DTED Layer needs to be added to the MapBean before it can draw images!");
return new OMGraphicList();
}
// Check to make sure the projection is EqualArc
if (!(projection instanceof EqualArc)) {
if (!firstProjectionWarningSent) {
fireRequestInfoLine(" DTED requires an Equal Arc projection (CADRG/LLXY) to view images.");
Debug.output("DTEDFrameCacheLayer: DTED requires an Equal Arc projection (CADRG/LLXY) to view images.");
firstProjectionWarningSent = true;
}
return new OMGraphicList();
}
Debug.message("basic", getName()
+ "|DTEDFrameCacheLayer.prepare(): doing it");
// Setting the OMGraphicsList for this layer. Remember, the
// OMGraphicList is made up of OMGraphics, which are generated
// (projected) when the graphics are added to the list. So,
// after this call, the list is ready for painting.
// call getRectangle();
if (Debug.debugging("dted")) {
Debug.output(getName() + "|DTEDFrameCacheLayer.prepare(): "
+ "calling getRectangle " + " with projection: "
+ projection + " ul = " + projection.getUpperLeft()
+ " lr = " + projection.getLowerRight());
}
OMGraphicList omGraphicList;
if (projection.getScale() < maxScale) {
omGraphicList = cache.getRectangle((EqualArc) projection);
} else {
fireRequestInfoLine(" The scale is too small for DTED viewing.");
Debug.error("DTEDFrameCacheLayer: scale (1:" + projection.getScale()
+ ") is smaller than minimum (1:" + maxScale + ") allowed.");
omGraphicList = new OMGraphicList();
}
/////////////////////
// safe quit