Index: trunk/gui/scripts/map.tcl
===================================================================
--- trunk/gui/scripts/map.tcl	(revision 5006)
+++ trunk/gui/scripts/map.tcl	(revision 5008)
@@ -1,3 +1,3 @@
-# -*- mode: tcl; indent-tabs-mode: nil -*- 
+# -*- mode: tcl; indent-tabs-mode: nil -*-
 
 # ----------------------------------------------------------------------
@@ -19,6 +19,6 @@
 package require BLT
 
-namespace eval Rappture { 
-    # forward declaration 
+namespace eval Rappture {
+    # forward declaration
 }
 
@@ -47,9 +47,9 @@
     protected method Parse { xmlobj path }
 
-    constructor {xmlobj path} { 
-        # defined below 
-    }
-    destructor { 
-        # defined below 
+    constructor {xmlobj path} {
+        # defined below
+    }
+    destructor {
+        # defined below
     }
 
@@ -123,5 +123,5 @@
         set name "layer[incr _nextLayer]"
         set child [$_tree insert $parent -label $name]
-        set layerType [$layers get $layer.type] 
+        set layerType [$layers get $layer.type]
         if { ![info exists _layerTypes($layerType)] } {
             error "invalid layer type \"$layerType\": should be one of [array names _layerTypes]"
@@ -130,5 +130,5 @@
         $_tree set $child "type" $layerType
         foreach key { label description } {
-            $_tree set $child $key [$layers get $layer.$key] 
+            $_tree set $child $key [$layers get $layer.$key]
         }
         # Common settings (for all layer types) with defaults
@@ -156,5 +156,5 @@
                 $_tree set $child "gdal.$key" $value
             }
-            set file [$layers get $layer.gdal.file] 
+            set file [$layers get $layer.gdal.file]
             if { $file != "" } {
                 # FIXME: Add test for valid file path
@@ -169,5 +169,5 @@
                 $_tree set $child "ogr.$key" $value
             }
-            set file [$layers get $layer.ogr.file] 
+            set file [$layers get $layer.ogr.file]
             if { $file != "" } {
                 # FIXME: Add test for valid file path
@@ -251,5 +251,5 @@
     if { $mapType == "" } {
         set mapType "projected";           # Default type is "projected".
-    } 
+    }
     if { ![info exists _mapTypes($mapType)] } {
         error "unknown map type \"$mapType\": should be one of [array names _mapTypes]"
@@ -280,5 +280,5 @@
     set list {}
     foreach node [$_tree children root->"layers"] {
-        lappend list [$_tree label $node] 
+        lappend list [$_tree label $node]
     }
     return $list
@@ -293,5 +293,5 @@
     set list {}
     foreach node [$_tree children root->"viewpoints"] {
-        lappend list [$_tree label $node] 
+        lappend list [$_tree label $node]
     }
     return $list
@@ -340,11 +340,11 @@
 # USAGE: isGeocentric
 #
-# Returns if the map is geocentric (1) or projected (0) 
-# ---------------------------------------------------------------------- 
-itcl::body Rappture::Map::isGeocentric {} { 
+# Returns if the map is geocentric (1) or projected (0)
+# ----------------------------------------------------------------------
+itcl::body Rappture::Map::isGeocentric {} {
     return [expr {[hints "type"] eq "geocentric"}]
-} 
-
-itcl::body Rappture::Map::earthfile {} { 
+}
+
+itcl::body Rappture::Map::earthfile {} {
     array set info [$_tree get root]
     append out "<map"
@@ -408,3 +408,3 @@
     }
     append out "</map>\n"
-} 
+}
Index: trunk/gui/scripts/mapviewer.tcl
===================================================================
--- trunk/gui/scripts/mapviewer.tcl	(revision 5006)
+++ trunk/gui/scripts/mapviewer.tcl	(revision 5008)
@@ -1,3 +1,3 @@
-# -*- mode: tcl; indent-tabs-mode: nil -*- 
+# -*- mode: tcl; indent-tabs-mode: nil -*-
 # ----------------------------------------------------------------------
 #  COMPONENT: mapviewer - Map object viewer
@@ -39,5 +39,5 @@
     itk_option define -plotbackground plotBackground Background ""
 
-    private variable _layersFrame "";	# Name of layers frame widget
+    private variable _layersFrame "";   # Name of layers frame widget
     private variable _mapsettings;      # Global map settings
 
@@ -60,6 +60,6 @@
     public method get {args}
     public method isconnected {}
-    public method parameters {title args} { 
-        # do nothing 
+    public method parameters {title args} {
+        # do nothing
     }
     public method scale {args}
@@ -77,5 +77,5 @@
     private method AdjustSetting {what {value ""}}
     private method BuildCameraTab {}
-    private method BuildDownloadPopup { widget command } 
+    private method BuildDownloadPopup { widget command }
     private method BuildLayerTab {}
     private method BuildMapTab {}
@@ -90,7 +90,7 @@
     private method EventuallyHandleMotionEvent { x y }
     private method EventuallyPan { dx dy }
-    private method EventuallyResize { w h } 
-    private method EventuallyRotate { dx dy } 
-    private method GetImage { args } 
+    private method EventuallyResize { w h }
+    private method EventuallyRotate { dx dy }
+    private method GetImage { args }
     private method GetNormalizedMouse { x y }
     private method InitSettings { args  }
@@ -111,9 +111,9 @@
     private method Zoom {option {x 0} {y 0}}
 
-    private variable _dlist "";		# list of data objects
+    private variable _dlist "";         # list of data objects
     private variable _obj2datasets
-    private variable _obj2ovride;	# maps dataobj => style override
-    private variable _layers;		# Contains the names of all the 
-                                   	# layer in the server.
+    private variable _obj2ovride;       # maps dataobj => style override
+    private variable _layers;           # Contains the names of all the
+                                        # layer in the server.
     private variable _viewpoints;
     private variable _click;            # info used for rotate operations
@@ -159,5 +159,5 @@
 
     if { [catch {
-	
+
     # Rebuild event
     $_dispatcher register !rebuild
@@ -267,6 +267,6 @@
 
     set _map(id) [$c create image 0 0 -anchor nw -image $_image(plot)]
-    set _map(cwidth) -1 
-    set _map(cheight) -1 
+    set _map(cwidth) -1
+    set _map(cheight) -1
     set _map(zoom) 1.0
     set _map(original) ""
@@ -323,5 +323,5 @@
     set _image(legend) [image create photo]
     itk_component add legend {
-        canvas $itk_component(plotarea).legend -width 50 -highlightthickness 0 
+        canvas $itk_component(plotarea).legend -width 50 -highlightthickness 0
     } {
         usual
@@ -330,5 +330,5 @@
     }
 
-    # Hack around the Tk panewindow.  The problem is that the requested 
+    # Hack around the Tk panewindow.  The problem is that the requested
     # size of the 3d view isn't set until an image is retrieved from
     # the server.  So the panewindow uses the tiny size.
@@ -336,5 +336,5 @@
     pack forget $itk_component(view)
     blt::table $itk_component(plotarea) \
-        0,0 $itk_component(view) -fill both -reqwidth $w 
+        0,0 $itk_component(view) -fill both -reqwidth $w
     blt::table configure $itk_component(plotarea) c1 -resize none
 
@@ -484,5 +484,5 @@
     Connect
 } errs] != 0 } {
-	puts stderr errs=$errs
+        puts stderr errs=$errs
     }
 }
@@ -665,5 +665,5 @@
                     continue
                 }
-                if {[info exists _obj2ovride($dataobj-raise)] && 
+                if {[info exists _obj2ovride($dataobj-raise)] &&
                     $_obj2ovride($dataobj-raise)} {
                     set dlist [linsert $dlist 0 $dataobj]
@@ -693,5 +693,5 @@
             }
             return $dlist
-        }           
+        }
         -image {
             if {[llength $args] != 2} {
@@ -741,5 +741,5 @@
             continue
         }
-        array unset hints 
+        array unset hints
         array set hints [$dataobj hints]
         if { ![info exists _mapsettings(label)] } {
@@ -786,5 +786,5 @@
                 set _haveTerrain 1
                 break
-            } 
+            }
         }
         foreach viewpoint [$dataobj viewpoints] {
@@ -941,5 +941,5 @@
     # disconnected -- no more data sitting on server
     array unset _layers
-    array unset _layersFrame 
+    array unset _layersFrame
     global readyForNextFrame
     set readyForNextFrame 1
@@ -1085,5 +1085,5 @@
                     $itk_component(time) configure -state disabled
                     set proj $_mapsettings(projection)
-                    if { $proj == "" } { 
+                    if { $proj == "" } {
                         SendCmd "map reset projected global-mercator"
                     } elseif { ![info exists _mapsettings(extents)] || $_mapsettings(extents) == "" } {
@@ -1094,5 +1094,5 @@
                             set $key $_mapsettings($key)
                         }
-                        SendCmd [list map reset "projected" $proj $x1 $y1 $x2 $y2] 
+                        SendCmd [list map reset "projected" $proj $x1 $y1 $x2 $y2]
                     }
                 }
@@ -1102,5 +1102,5 @@
 
             # Most terrain settings are global to the map and apply even
-            # if there is no elevation layer.  The exception is the 
+            # if there is no elevation layer.  The exception is the
             # vertical scale, which only applies if there is an elevation
             # layer
@@ -1124,6 +1124,6 @@
         set _obj2datasets($dataobj) ""
         foreach layer [$dataobj layers] {
-	    array unset info
-	    array set info [$dataobj layer $layer]
+            array unset info
+            array set info [$dataobj layer $layer]
             if { ![info exists _layers($layer)] } {
                 if { $_reportClientInfo }  {
@@ -1203,5 +1203,5 @@
 itcl::body Rappture::MapViewer::CurrentLayers {args} {
     set flag [lindex $args 0]
-    switch -- $flag { 
+    switch -- $flag {
         "-all" {
             if { [llength $args] > 1 } {
@@ -1222,5 +1222,5 @@
                 set dlist [get -visible]
             }
-        }           
+        }
         default {
             set dlist $args
@@ -1611,5 +1611,5 @@
         -variable [itcl::scope _settings(coords-visible)] \
         -command [itcl::code $this AdjustSetting coords-visible] \
-        -font "Arial 9" -anchor w 
+        -font "Arial 9" -anchor w
 
     itk_component add grid {
@@ -1618,7 +1618,7 @@
         -variable [itcl::scope _settings(grid)] \
         -command [itcl::code $this AdjustSetting grid] \
-        -font "Arial 9" -anchor w 
+        -font "Arial 9" -anchor w
     } {
-	ignore -font
+        ignore -font
     }
 
@@ -1627,5 +1627,5 @@
         -variable [itcl::scope _settings(terrain-wireframe)] \
         -command [itcl::code $this AdjustSetting terrain-wireframe] \
-        -font "Arial 9" -anchor w 
+        -font "Arial 9" -anchor w
 
     checkbutton $inner.lighting \
@@ -1704,5 +1704,5 @@
         0,1 $inner.vscale    -fill x   -pady 2
 #        1,0 $inner.palette_l -anchor w -pady 2 \
-#        1,1 $inner.palette   -fill x   -pady 2  
+#        1,1 $inner.palette   -fill x   -pady 2
 
     blt::table configure $inner r* c* -resize none
@@ -1721,5 +1721,5 @@
     set f [frame $inner.layers]
     blt::table $inner \
-        0,0 $f -fill both 
+        0,0 $f -fill both
     set _layersFrame $inner
 }
@@ -1802,5 +1802,5 @@
 
 #
-#  camera -- 
+#  camera --
 #
 # USAGE: camera get
@@ -1811,5 +1811,5 @@
 #
 itcl::body Rappture::MapViewer::camera {option args} {
-    switch -- $option { 
+    switch -- $option {
         "get" {
             # We got the camera settings from the server
@@ -1874,5 +1874,5 @@
 
 itcl::body Rappture::MapViewer::GetImage { args } {
-    if { [image width $_image(download)] > 0 && 
+    if { [image width $_image(download)] > 0 &&
          [image height $_image(download)] > 0 } {
         set bytes [$_image(download) data -format "jpeg -quality 100"]
@@ -1887,9 +1887,9 @@
         -title "[Rappture::filexfer::label downloadWord] as..."
     set inner [$popup component inner]
-    label $inner.summary -text "" -anchor w 
+    label $inner.summary -text "" -anchor w
 
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -value image 
+        -value image
     Rappture::Tooltip::for $inner.image_button \
         "Save as digital image."
@@ -1911,5 +1911,5 @@
         2,0 $inner.image_button -anchor w -cspan 2 -padx { 4 0 } \
         4,1 $inner.cancel -width .9i -fill y \
-        4,0 $inner.ok -padx 2 -width .9i -fill y 
+        4,0 $inner.ok -padx 2 -width .9i -fill y
     blt::table configure $inner r3 -height 4
     blt::table configure $inner r4 -pady 4
@@ -1990,5 +1990,5 @@
                                      $layer]
                     }
-                }                        
+                }
             }
             SendCmd "map layer opacity $settings(-opacity) $layer"
@@ -2099,5 +2099,5 @@
 }
 
-itcl::body Rappture::MapViewer::UpdateLayerControls {} { 
+itcl::body Rappture::MapViewer::UpdateLayerControls {} {
     set row 0
     set inner $_layersFrame
@@ -2110,6 +2110,6 @@
     foreach dataobj [get -objects] {
         foreach layer [$dataobj layers] {
-	    array unset info
-	    array set info [$dataobj layer $layer]
+            array unset info
+            array set info [$dataobj layer $layer]
             checkbutton $f.${layer}-visible \
                 -text $info(label) \
@@ -2132,5 +2132,5 @@
                 incr row
             }
-	}
+        }
     }
     if { $row > 0 } {
@@ -2143,5 +2143,5 @@
 # Generate an OSG Earth file to send to server.  This is inteneded
 # as a stopgap and testing tool until the protocol is fleshed out.
-# 
+#
 # Note that the lighting settings are required to be "hard-coded"
 # as below for the runtime control to work.  Don't make those user
@@ -2151,5 +2151,5 @@
 # the parser in OSG Earth accepts all of Tcl's forms of boolean vals.
 #
-itcl::body Rappture::MapViewer::EarthFile {} { 
+itcl::body Rappture::MapViewer::EarthFile {} {
     append out "<map"
     append out " name=\"$_mapsettings(label)\""
@@ -2221,3 +2221,3 @@
     append out "</map>\n"
     return $out
-} 
+}
