- Timestamp:
- Mar 25, 2014, 11:23:30 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/map.tcl
r4270 r4271 48 48 public method layers {} 49 49 public method extents {} 50 public method projection {} 50 51 public method layer { name } 51 52 public method hints { args } … … 97 98 } 98 99 } 100 } 101 102 # 103 # projection -- 104 # 105 itcl::body Rappture::Map::projection {} { 106 return [$_tree get root "projection" ""] 99 107 } 100 108 -
trunk/gui/scripts/mapviewer.tcl
r4266 r4271 169 169 # Initialize the view to some default parameters. 170 170 array set _view { 171 qw 0.853553172 qx -0.353553173 qy 0. 353553174 qz 0. 146447175 zoom 1.0 176 xpan 0 177 ypan 0 171 qw 1.0 172 qx 0.0 173 qy 0.0 174 qz 0.0 175 zoom 1.0 176 xpan 0.0 177 ypan 0.0 178 178 } 179 179 set _arcball [blt::arcball create 100 100] … … 187 187 legend 1 188 188 terrain-edges 0 189 terrain-lighting 1189 terrain-lighting 0 190 190 terrain-vertscale 1.0 191 191 terrain-wireframe 0 … … 450 450 set pos [lsearch -exact $_dlist $dataobj] 451 451 if {$pos < 0} { 452 #if {[llength $_dlist] > 0} { 453 # error "Can't add more than 1 map to mapviewer" 454 #} 452 455 lappend _dlist $dataobj 453 456 } … … 844 847 $_arcball resize $w $h 845 848 DoResize 846 #FixSettings ? 847 848 if { $_haveTerrain } {849 FixSettings terrain-edges terrain-lighting terrain-wireframe terrain-vertscale850 }851 StopBufferingCommands852 SendCmd "imgflush"853 StartBufferingCommands849 850 #if { $_haveTerrain } { 851 # FixSettings terrain-edges terrain-lighting terrain-vertscale \ 852 # terrain-wireframe 853 #} 854 #StopBufferingCommands 855 #SendCmd "imgflush" 856 #StartBufferingCommands 854 857 } 855 858 … … 861 864 foreach dataobj [get -objects] { 862 865 set _obj2datasets($dataobj) "" 866 if {$_first == ""} { 867 # The map must be reset once before any layers are added 868 # This should not be done more than once as it is very 869 # expensive 870 set _first $dataobj 871 set profile [$dataobj projection] 872 set extents [$dataobj extents] 873 if {[$dataobj isGeocentric]} { 874 SendCmd "map reset geocentric" 875 } elseif {$extents == ""} { 876 set profile "global-mercator" 877 SendCmd "map reset projected $profile" 878 } else { 879 SendCmd "map reset projected $profile [list $extents]" 880 } 881 if { $_haveTerrain } { 882 FixSettings terrain-edges terrain-lighting terrain-vertscale \ 883 terrain-wireframe 884 } 885 SendCmd "imgflush" 886 } 863 887 foreach layer [$dataobj layers] { 864 888 array unset info … … 1065 1089 "reset" { 1066 1090 array set _view { 1067 qw 0.8535531068 qx -0.3535531069 qy 0. 3535531070 qz 0. 1464471091 qw 1.0 1092 qx 0.0 1093 qy 0.0 1094 qz 0.0 1071 1095 zoom 1.0 1072 xpan 0 1073 ypan 0 1096 xpan 0.0 1097 ypan 0.0 1074 1098 } 1075 1099 if { $_first != "" } { … … 1236 1260 SendCmd "map terrain lighting $bool" 1237 1261 } 1262 "terrain-palette" { 1263 set cmap [$itk_component(terrainpalette) value] 1264 #SendCmd "map terrain colormap $cmap" 1265 } 1238 1266 "terrain-vertscale" { 1239 1267 set val $_settings(terrain-vertscale) … … 1328 1356 1329 1357 label $inner.palette_l -text "Palette" -font "Arial 9" -anchor w 1330 itk_component add meshpalette {1358 itk_component add terrainpalette { 1331 1359 Rappture::Combobox $inner.palette -width 10 -editable no 1332 1360 } … … 1349 1377 "orange-to-blue" "orange-to-blue" 1350 1378 1351 $itk_component( meshpalette) value "BCGYR"1379 $itk_component(terrainpalette) value "BCGYR" 1352 1380 bind $inner.palette <<Value>> \ 1353 1381 [itcl::code $this AdjustSetting terrain-palette] … … 1521 1549 -edgecolor black 1522 1550 -edges 0 1523 -lighting 11551 -lighting 0 1524 1552 -linewidth 1.0 1525 1553 -vertscale 1.0
Note: See TracChangeset
for help on using the changeset viewer.