Changeset 4291 for trunk/gui


Ignore:
Timestamp:
Mar 28, 2014 5:48:04 PM (10 years ago)
Author:
ldelgass
Message:

Store map.style for global map view settings (wireframe, lighting, etc.). Fix
method doc comments

File:
1 edited

Legend:

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

    r4290 r4291  
    5353    public method isGeocentric {}
    5454    public method layers {}
    55     public method layer { name }
     55    public method layer { layerName }
    5656    public method hints { args }
    5757    public method isvalid {} {
    5858        return $_isValid;
    5959    }
    60     public method type { name } {
    61         set id [$_tree findchild root->"layers" $name]
    62         if { $id < 0 } {
    63             error "unknown layer \"$name\""
    64         }
    65         return [$_tree get $id "type" ""]
    66     }
     60    public method type { layerName }
    6761}
    6862
     
    139133    }
    140134    $_tree set root "label"       [$map get "about.label"]
    141 
     135    $_tree set root "style"       [$map get "style"]
     136 
    142137    set projection [$map get "projection"]
    143138    set extents    [$map get "extents"]
     
    179174# USAGE: layers
    180175#
    181 # Returns the list of settings for each marker on the x-axis.
    182 # If no markers have been specified the empty string is returned.
     176# Returns a list of labels for the layers in the map
    183177# ----------------------------------------------------------------------
    184178itcl::body Rappture::Map::layers {} {
     
    191185
    192186# ----------------------------------------------------------------------
    193 # USAGE: layer
    194 #
    195 # Returns the list of settings for each marker on the y-axis.
    196 # If no markers have been specified the empty string is returned.
     187# USAGE: layer <layerName>
     188#
     189# Returns an array of settings for the named layer
    197190# ----------------------------------------------------------------------
    198191itcl::body Rappture::Map::layer { layerName } {
     
    204197}
    205198
    206 # ----------------------------------------------------------------------
     199# ----------------------------------------------------------------------
     200# USAGE: type <layerName>
     201#
     202# Returns the type of the named layer
     203# ----------------------------------------------------------------------
     204itcl::body Rappture::Map::type { layerName } {
     205    set id [$_tree findchild root->"layers" $layerName]
     206    if { $id < 0 } {
     207        error "unknown layer \"$layerName\""
     208    }
     209    return [$_tree get $id "type" ""]
     210}
     211
     212# ----------------------------------------------------------------------
     213# USAGE: isGeocentric
     214#
    207215# Returns if the map is geocentric (1) or projected (0)
    208216# ----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.