Changeset 6495
- Timestamp:
- Aug 22, 2016 2:34:51 PM (7 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/map.tcl
r6493 r6495 105 105 "elevation" 1 106 106 "feature" 2 107 "polygon" 3 108 "point" 4 109 "icon" 5 110 "line" 6 111 "label" 7 107 "model" 3 108 "polygon" 4 109 "point" 5 110 "icon" 6 111 "line" 7 112 "label" 8 112 113 } 113 114 array set _mapTypes { … … 173 174 itcl::body Rappture::Map::parseXML { xmlobj path } { 174 175 set map [$xmlobj element -as object $path] 176 set elemType [$xmlobj element -as type $path] 177 if {$elemType != "map"} { 178 puts stderr "ERROR: Invalid map XML: \"$elemType\"" 179 return 180 } 175 181 176 182 # Set global map properties … … 379 385 } 380 386 $_tree set $child "driver" "ogr" 387 } 388 set osg [$layers element -as type $layer.osg] 389 if { $osg != "" } { 390 foreach key { url } { 391 set value [$layers get $layer.osg.$key] 392 $_tree set $child "osg.$key" $value 393 } 394 set file [$layers get $layer.osg.file] 395 if { $file != "" } { 396 $_tree set $child "osg.url" $file 397 } 398 $_tree set $child "osg.x" 0.0 399 $_tree set $child "osg.y" 0.0 400 $_tree set $child "osg.z" 0.0 401 foreach key { x y z rotx roty rotz paged } { 402 set value [$layers get $layer.osg.$key] 403 if { $value != "" } { 404 $_tree set $child "osg.$key" $value 405 } 406 } 407 $_tree set $child "driver" "osg" 381 408 } 382 409 set tfs [$layers element -as type $layer.tfs] … … 735 762 } 736 763 } 764 "osg" { 765 array set params $driverParamArray 766 foreach key { url } { 767 set value $params($key) 768 $_tree set $child "osg.$key" $value 769 } 770 $_tree set $child "osg.x" 0.0 771 $_tree set $child "osg.y" 0.0 772 $_tree set $child "osg.z" 0.0 773 foreach key { x y z rotx roty rotz paged } { 774 if {[info exists params($key)]} { 775 set value $params($key) 776 if { $value != "" } { 777 $_tree set $child "osg.$key" $value 778 } 779 } 780 } 781 } 737 782 "tfs" { 738 783 array set params $driverParamArray … … 1234 1279 } 1235 1280 } 1236 "image" - "elevation" - "feature" {1281 "image" - "elevation" - "feature" - "model" { 1237 1282 } 1238 1283 default { -
trunk/gui/scripts/mapviewer.tcl
r6494 r6495 2804 2804 set verticalDatum $info(verticalDatum) 2805 2805 } 2806 switch -- $info(driver) 2806 switch -- $info(driver) { 2807 2807 "gdal" { 2808 2808 SendFiles $info(gdal.url) … … 2902 2902 SendCmd "map layer opacity $style(-opacity) $tag" 2903 2903 } 2904 "model" { 2905 switch -- $info(driver) { 2906 "osg" { 2907 SendFiles $info(osg.url) 2908 SendCmd [list map layer add $tag model simple $info(osg.url) $info(osg.x) $info(osg.y) $info(osg.z)] 2909 } 2910 } 2911 } 2904 2912 "line" { 2905 2913 array set style { … … 2923 2931 set _opacity($tag) [expr $style(-opacity) * 100] 2924 2932 foreach {r g b} [Color2RGB $style(-color)] {} 2925 switch -- $info(driver) 2933 switch -- $info(driver) { 2926 2934 "ogr" { 2927 2935 SendFiles $info(ogr.url) … … 2972 2980 set _opacity($tag) [expr $style(-opacity) * 100] 2973 2981 foreach {r g b} [Color2RGB $style(-color)] {} 2974 switch -- $info(driver) 2982 switch -- $info(driver) { 2975 2983 "ogr" { 2976 2984 SendFiles $info(ogr.url) … … 3024 3032 } 3025 3033 set _opacity($tag) [expr $style(-opacity) * 100] 3026 switch -- $info(driver) 3034 switch -- $info(driver) { 3027 3035 "ogr" { 3028 3036 SendFiles $info(ogr.url) … … 3077 3085 foreach {r g b} [Color2RGB $style(-color)] {} 3078 3086 foreach {strokeR strokeG strokeB} [Color2RGB $style(-strokecolor)] {} 3079 switch -- $info(driver) 3087 switch -- $info(driver) { 3080 3088 "ogr" { 3081 3089 SendFiles $info(ogr.url) … … 3142 3150 foreach {fgR fgG fgB} [Color2RGB $style(-color)] {} 3143 3151 foreach {bgR bgG bgB} [Color2RGB $style(-halocolor)] {} 3144 switch -- $info(driver) 3152 switch -- $info(driver) { 3145 3153 "ogr" { 3146 3154 SendFiles $info(ogr.url)
Note: See TracChangeset
for help on using the changeset viewer.