Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def centerOnLatLon(latitude, longitude):
    mcv = McIDASV.getStaticMcv()
    if mcv:
        viewManagers = getViewManagers()
        earthLoc = Util.makeEarthLocation(latitude, longitude)
        mcv.getVMManager().center(earthLoc, viewManagers)
Esempio n. 4
0
def centerOnLatLon(latitude, longitude):
    mcv = McIDASV.getStaticMcv()
    if mcv:
        viewManagers =  getViewManagers()
        earthLoc = Util.makeEarthLocation(latitude, longitude)
        mcv.getVMManager().center(earthLoc, viewManagers)