Changeset 4291
- Timestamp:
- Mar 28, 2014, 5:48:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/map.tcl
r4290 r4291 53 53 public method isGeocentric {} 54 54 public method layers {} 55 public method layer { name }55 public method layer { layerName } 56 56 public method hints { args } 57 57 public method isvalid {} { 58 58 return $_isValid; 59 59 } 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 } 67 61 } 68 62 … … 139 133 } 140 134 $_tree set root "label" [$map get "about.label"] 141 135 $_tree set root "style" [$map get "style"] 136 142 137 set projection [$map get "projection"] 143 138 set extents [$map get "extents"] … … 179 174 # USAGE: layers 180 175 # 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 183 177 # ---------------------------------------------------------------------- 184 178 itcl::body Rappture::Map::layers {} { … … 191 185 192 186 # ---------------------------------------------------------------------- 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 197 190 # ---------------------------------------------------------------------- 198 191 itcl::body Rappture::Map::layer { layerName } { … … 204 197 } 205 198 206 # ---------------------------------------------------------------------- 199 # ---------------------------------------------------------------------- 200 # USAGE: type <layerName> 201 # 202 # Returns the type of the named layer 203 # ---------------------------------------------------------------------- 204 itcl::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 # 207 215 # Returns if the map is geocentric (1) or projected (0) 208 216 # ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.