Changeset 6263 for trunk/gui/scripts/mapviewer.tcl
- Timestamp:
- Apr 12, 2016, 7:12:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r6262 r6263 106 106 private method GetImage { args } 107 107 private method GetNormalizedMouse { x y } 108 private method GoToViewpoint { dataobj viewpoint }108 private method GoToViewpoint { dataobj viewpoint {duration 2.0} } 109 109 private method InitSettings { args } 110 110 private method MapIsGeocentric {} … … 2368 2368 Camera reset 2369 2369 } 2370 "viewpoint" { 2371 if {[llength $args] < 1} { 2372 error "wrong # args to camera viewpoint" 2373 } 2374 set vpopt [lindex $args 0] 2375 switch -- $vpopt { 2376 "go" { 2377 if {[llength $args] < 3} { 2378 error "wrong # of args to camera viewpoint go" 2379 } 2380 foreach {dataobj viewpoint} [lrange $args 1 end] break 2381 GoToViewpoint $dataobj $viewpoint 2382 } 2383 default { 2384 error "Unknown camera viewpoint option \"$vpopt\"" 2385 } 2386 } 2387 } 2370 2388 "zoom" { 2371 2389 if {[llength $args] < 1} { … … 2503 2521 } 2504 2522 2505 itcl::body Rappture::MapViewer::GoToViewpoint { dataobj viewpoint } {2523 itcl::body Rappture::MapViewer::GoToViewpoint { dataobj viewpoint {duration 2.0}} { 2506 2524 array set view [subst { 2507 2525 x 0 … … 2524 2542 set _view(pitch) -90 2525 2543 } 2526 set duration 2.02527 2544 SendCmd [list camera set $_view(x) $_view(y) $_view(z) $_view(heading) $_view(pitch) $_view(distance) $duration $_view(srs) $_view(verticalDatum)] 2528 2545 }
Note: See TracChangeset
for help on using the changeset viewer.