Changeset 4637
- Timestamp:
- Sep 19, 2014 12:05:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r4633 r4637 894 894 "coords" { 895 895 set len [llength $args] 896 if {$len < 5} {896 if {$len < 3} { 897 897 error "Bad map coords response" 898 898 } else { 899 899 set token [lindex $args 1] 900 900 } 901 if {$len == 5} { 902 puts stderr "\[$token - $elapsed\] Map coords out of range" 903 } elseif {$len < 7} { 904 foreach { x y z } [lrange $args 2 end] break 905 puts stderr "\[$token - $elapsed\] Map coords: $x $y $z" 906 } elseif {$len < 8} { 907 foreach { x y z screenX screenY } [lrange $args 2 end] break 908 puts stderr "\[$token - $elapsed\] Map coords($screenX,$screenY): $x $y $z" 909 } else { 910 foreach { x y z screenX screenY srs vert } [lrange $args 2 end] break 911 puts stderr "\[$token - $elapsed\] Map coords($screenX,$screenY): $x $y $z {$srs} {$vert}" 901 foreach { x y z } [lindex $args 2] { 902 puts stderr "\[$token\] Map coords: $x $y $z" 903 } 904 if {$len > 3} { 905 set srs [lindex $args 3] 906 set vert [lindex $args 4] 907 puts stderr "\[$token\] {$srs} {$vert}" 912 908 } 913 909 } … … 934 930 "coords" { 935 931 set len [llength $args] 936 if {$len < 6} {932 if {$len < 3} { 937 933 error "Bad screen coords response" 938 934 } else { 939 935 set token [lindex $args 1] 940 936 } 941 if {$len == 6} { 942 puts stderr "\[$token\] Screen coords out of range" 943 } else { 944 foreach { x y z worldX worldY worldZ } [lrange $args 2 end] break 945 puts stderr "\[$token\] Screen coords($worldX,$worldY,$worldZ): $x $y $z" 937 foreach { x y z } [lindex $args 2] { 938 puts stderr "\[$token\] Screen coords: $x $y $z" 946 939 } 947 940 }
Note: See TracChangeset
for help on using the changeset viewer.