- Timestamp:
- Apr 7, 2016, 12:52:01 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r6256 r6257 55 55 public method disconnect {} 56 56 public method download {option args} 57 public method enablePlacard {state layerName}57 public method placard {option args} 58 58 public method get {args} 59 59 public method isconnected {} … … 990 990 991 991 # ---------------------------------------------------------------------- 992 # USAGE: enablePlacard<state> <layerName>992 # USAGE: placard enable <state> <layerName> 993 993 # 994 994 # Clients use this method to enable/disable display of a feature placard 995 995 # when a feature is clicked/selected. 996 996 # ---------------------------------------------------------------------- 997 itcl::body Rappture::MapViewer::enablePlacard {state layerName} { 998 if {![info exists _layers($layerName)]} { 999 error "Unknown layer \"$layerName\"" 1000 } 1001 if {![string is boolean $state]} { 1002 error "argument to enablePlacard must be boolean" 1003 } 1004 SendCmd "placard enable $state $layerName" 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 } 1005 1017 } 1006 1018
Note: See TracChangeset
for help on using the changeset viewer.