Ignore:
Timestamp:
Mar 26, 2014, 1:52:16 PM (10 years ago)
Author:
ldelgass
Message:

Add menu options to reset map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/mapviewer-test

    r4269 r4277  
    149149}
    150150
     151proc resetMapGeocentric {} {
     152    global widgets
     153    set cmd "map reset geocentric"
     154    namespace eval Rappture::MapViewer [list $widgets(mapviewer) SendCmd $cmd]
     155}
     156
     157proc resetMapGlobalGeodetic {} {
     158    global widgets
     159    set cmd "map reset projected global-geodetic"
     160    namespace eval Rappture::MapViewer [list $widgets(mapviewer) SendCmd $cmd]
     161}
     162
     163proc resetMapGlobalMercator {} {
     164    global widgets
     165    set cmd "map reset projected global-mercator"
     166    namespace eval Rappture::MapViewer [list $widgets(mapviewer) SendCmd $cmd]
     167}
     168
    151169# ----------------------------------------------------------------------
    152170# USAGE: show_comm <channel> <data>
     
    268286.mbar.file add command -label "Send Earth File..." -underline 0 -command send_file
    269287.mbar.file add command -label "Load script..." -underline 0 -command load_script
     288.mbar.file add command -label "Reset Map to Geocentric" -underline 0 -command resetMapGeocentric
     289.mbar.file add command -label "Reset Map to Geodetic Projection" -underline 0 -command resetMapGlobalGeodetic
     290.mbar.file add command -label "Reset Map to Mercator Projection" -underline 0 -command resetMapGlobalMercator
    270291.mbar.file add command -label "Reset" -underline 0 -command reset
    271292.mbar.file add separator
Note: See TracChangeset for help on using the changeset viewer.