diff --git a/src/openmap/com/bbn/openmap/layer/link/LinkLayer.java b/src/openmap/com/bbn/openmap/layer/link/LinkLayer.java index afe77c37..c4e86410 100644 --- a/src/openmap/com/bbn/openmap/layer/link/LinkLayer.java +++ b/src/openmap/com/bbn/openmap/layer/link/LinkLayer.java @@ -237,7 +237,16 @@ public synchronized void setGraphicList(LinkOMGraphicList aList) { * Retrieves the current graphics list. */ public synchronized LinkOMGraphicList getGraphicList() { - return (LinkOMGraphicList) getList(); + try { + return (LinkOMGraphicList) getList(); + } + catch (ClassCastException e) { + if (Debug.debugging("link")) + { + Debug.output("OMGraphicHandlerLayer does not currently have a LinkOMGraphicList."); + } + return null; + } } /** @@ -1273,8 +1282,8 @@ public void updateMap(LinkProperties props) { center = GreatCircle.sphericalBetween(ProjMath.degToRad(latmax), ProjMath.degToRad(lonmin), dist, azimuth); - latitude = (float) center.getY(); - longitude = (float) center.getX(); + latitude = (float) center.getX(); + longitude = (float) center.getY(); } MapHandler mapHandler = (MapHandler) getBeanContext();