Ignore:
Timestamp:
Mar 3, 2016, 10:18:29 PM (9 years ago)
Author:
ldelgass
Message:

map camera zoom layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/mapviewer.tcl

    r6100 r6101  
    22392239        }
    22402240        "zoom" {
    2241             if {[llength $args] < 3} {
     2241            if {[llength $args] < 1} {
    22422242                error "wrong # of args to camera zoom"
    22432243            }
     
    22602260                    }
    22612261                    SendCmd "camera extent $xmin $ymin $xmax $ymax $duration $srs"
     2262                }
     2263                "layer" {
     2264                    if {[llength $args] < 3} {
     2265                        error "wrong # of args to camera zoom layer"
     2266                    }
     2267                    foreach {dataobj layer duration} [lrange $args 1 end] break
     2268                    set tag $layer
     2269                    if {![$dataobj layer $layer shared]} {
     2270                        set tag $dataobj-$layer
     2271                    }
     2272                    if {![info exists _layers($tag)]} {
     2273                        error "Unknown layer $layer"
     2274                    }
     2275                    if {$duration == ""} {
     2276                        set duration 0.0
     2277                    } elseif {![string is double $duration]} {
     2278                        error "Invalid duration \"$duration\", should be a double"
     2279                    }
     2280                    SendCmd "camera lextent $tag $duration"
    22622281                }
    22632282                default {
Note: See TracChangeset for help on using the changeset viewer.