Changeset 6099
- Timestamp:
- Mar 3, 2016, 9:24:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r6098 r6099 2238 2238 Camera reset 2239 2239 } 2240 "zoom" { 2241 if {[llength $args] < 3} { 2242 error "wrong # of args to camera zoom" 2243 } 2244 set zoomopt [lindex $args 0] 2245 switch -- $zoomopt { 2246 "extent" { 2247 if {[llength $args] < 7} { 2248 error "wrong # of args to camera zoom extent" 2249 } 2250 foreach {xmin ymin xmax ymax duration srs} [lrange $args 1 end] break 2251 foreach key {xmin ymin xmax ymax} { 2252 if {![string is double -strict [set $key]]} { 2253 error "Invalid extent: $key=[set $key]" 2254 } 2255 } 2256 if {$duration == ""} { 2257 set duration 0.0 2258 } elseif {![string is double $duration]} { 2259 error "Invalid duration \"$duration\", should be a double" 2260 } 2261 SendCmd "camera extent $xmin $ymin $xmax $ymax $duration $srs" 2262 } 2263 default { 2264 error "Unknown camera zoom option \"$zoomopt\"" 2265 } 2266 } 2267 } 2240 2268 default { 2241 2269 error "Unknown camera option \"$option\""
Note: See TracChangeset
for help on using the changeset viewer.