def centerDisplay(viewId, useProjection=False): control = findDisplayControl(id) if not control: raise IllegalArgumentException('Could not find display: %s' % (id)) mcv = McIDASV.getStaticMcv() if mcv: viewManagers = getViewManagers(viewId) if useProjection and control.getDataProjection(): mapProjection = control.getDataProjection() mcv.getVMManager().center(mapProjection, viewManagers) elif control.getDisplayCenter(): centerPoint = Util.makeEarthLocation(control.getDisplayCenter()) mcv.getVMManager().center(centerPoint, viewManagers)
def centerOnLatLon(latitude, longitude): mcv = McIDASV.getStaticMcv() if mcv: viewManagers = getViewManagers() earthLoc = Util.makeEarthLocation(latitude, longitude) mcv.getVMManager().center(earthLoc, viewManagers)