Changeset 6256 for trunk


Ignore:
Timestamp:
Apr 7, 2016, 12:27:04 PM (8 years ago)
Author:
ldelgass
Message:

add enablePlacard method to mapviewer

File:
1 edited

Legend:

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

    r6225 r6256  
    5555    public method disconnect {}
    5656    public method download {option args}
     57    public method enablePlacard {state layerName}
    5758    public method get {args}
    5859    public method isconnected {}
     
    989990
    990991# ----------------------------------------------------------------------
     992# USAGE: enablePlacard <state> <layerName>
     993#
     994# Clients use this method to enable/disable display of a feature placard
     995# when a feature is clicked/selected.
     996# ----------------------------------------------------------------------
     997itcl::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"
     1005}
     1006
     1007# ----------------------------------------------------------------------
    9911008# USAGE: download coming
    9921009# USAGE: download controls <downloadCommand>
Note: See TracChangeset for help on using the changeset viewer.