Changeset 6258 for branches/blt4_trunk
- Timestamp:
- Apr 7, 2016 1:57:05 PM (8 years ago)
- Location:
- branches/blt4_trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4_trunk
-
branches/blt4_trunk/gui/scripts/mapviewer.tcl
r6252 r6258 55 55 public method disconnect {} 56 56 public method download {option args} 57 public method placard {option args} 57 58 public method get {args} 58 59 public method isconnected {} … … 989 990 990 991 # ---------------------------------------------------------------------- 992 # USAGE: placard enable <state> <layerName> 993 # 994 # Clients use this method to enable/disable display of a feature placard 995 # when a feature is clicked/selected. 996 # ---------------------------------------------------------------------- 997 itcl::body Rappture::MapViewer::placard {option args} { 998 switch $option { 999 enable { 1000 if {[llength $args] != 2} { 1001 error "wrong $ args: should be \"enable <boolean> <layerName>\"" 1002 } 1003 set state [lindex $args 0] 1004 set layerName [lindex $args 1] 1005 if {![info exists _layers($layerName)]} { 1006 error "Unknown layer \"$layerName\"" 1007 } 1008 if {![string is boolean $state]} { 1009 error "argument to placard enable must be boolean" 1010 } 1011 SendCmd "placard enable $state $layerName" 1012 } 1013 default { 1014 error "bad option \"$option\": should be enable" 1015 } 1016 } 1017 } 1018 1019 # ---------------------------------------------------------------------- 991 1020 # USAGE: download coming 992 1021 # USAGE: download controls <downloadCommand>
Note: See TracChangeset
for help on using the changeset viewer.