- Timestamp:
- Oct 1, 2015, 2:55:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r5892 r5896 116 116 private method Rotate {option x y} 117 117 private method Select {option x y} 118 private method SendFiles { path } 118 119 private method SetHeading { {value 0} } 119 120 private method SetLayerOpacity { dataobj layer {value 100} } … … 2337 2338 } 2338 2339 2340 itcl::body Rappture::MapViewer::SendFiles { path } { 2341 if {[string range $path 0 7] != "local://"} { 2342 return 2343 } 2344 DebugTrace "Local path: $path" 2345 set path [string range $path 8 end] 2346 set basename [file rootname $path] 2347 set files [glob -path $basename .*] 2348 foreach file $files { 2349 set name $file 2350 set type [file type $file] 2351 set size [file size $file] 2352 set f [open $file "r"] 2353 fconfigure $f -translation binary -encoding binary 2354 set data [read $f] 2355 close $f 2356 SendCmd [list file put $name $type $size] 2357 SendData $data 2358 } 2359 } 2360 2339 2361 itcl::body Rappture::MapViewer::SetLayerStyle { dataobj layer } { 2340 2362 array set info [$dataobj layer $layer] … … 2370 2392 "colorramp" { 2371 2393 set cmapName $layer 2394 SendFiles $info(colorramp.url) 2372 2395 SendCmd [list colormap define $cmapName $info(colorramp.colormap)] 2373 2396 SendCmd [list map layer add $layer image colorramp \ … … 2379 2402 } 2380 2403 "gdal" { 2404 SendFiles $info(gdal.url) 2381 2405 SendCmd [list map layer add $layer image gdal \ 2382 2406 $info(gdal.url) $info(cache) $coverage] … … 2412 2436 switch -- $info(driver) { 2413 2437 "gdal" { 2438 SendFiles $info(gdal.url) 2414 2439 SendCmd [list map layer add $layer elevation gdal \ 2415 2440 $info(gdal.url) $info(cache)] … … 2464 2489 lappend cmd $style(-minrange) $style(-maxrange) 2465 2490 } 2491 SendFiles $info(ogr.url) 2466 2492 SendCmd $cmd 2467 2493 } … … 2489 2515 switch -- $info(driver) { 2490 2516 "ogr" { 2517 SendFiles $info(ogr.url) 2491 2518 if {[info exists style(-minrange)] && [info exists style(-maxrange)]} { 2492 2519 SendCmd [list map layer add $layer line ogr {} {} $info(ogr.url) $info(cache) $r $g $b $style(-width) $style(-cap) $style(-join) $style(-stipplepattern) $style(-stipplefactor) $style(-clamping) $style(-clamptechnique) $style(-minrange) $style(-maxrange)] … … 2537 2564 switch -- $info(driver) { 2538 2565 "ogr" { 2566 SendFiles $info(ogr.url) 2539 2567 if {[info exists style(-minrange)] && [info exists style(-maxrange)]} { 2540 2568 SendCmd [list map layer add $layer point ogr {} {} $info(ogr.url) $info(cache) $r $g $b $style(-size) $style(-minrange) $style(-maxrange)] … … 2588 2616 switch -- $info(driver) { 2589 2617 "ogr" { 2618 SendFiles $info(ogr.url) 2590 2619 if {[info exists style(-minrange)] && [info exists style(-maxrange)]} { 2591 2620 SendCmd [list map layer add $layer icon ogr {} {} $info(ogr.url) $info(cache) $style(-icon) $style(-scale) $style(-heading) $style(-declutter) $style(-placement) $style(-align) $style(-minrange) $style(-maxrange)] … … 2640 2669 switch -- $info(driver) { 2641 2670 "ogr" { 2671 SendFiles $info(ogr.url) 2642 2672 if {[info exists style(-minrange)] && [info exists style(-maxrange)]} { 2643 2673 SendCmd [list map layer add $layer polygon ogr {} {} $info(ogr.url) $info(cache) $r $g $b $style(-strokewidth) $strokeR $strokeG $strokeB $style(-clamping) $style(-clamptechnique) $style(-minrange) $style(-maxrange)] … … 2704 2734 switch -- $info(driver) { 2705 2735 "ogr" { 2736 SendFiles $info(ogr.url) 2706 2737 if {[info exists style(-minrange)] && [info exists style(-maxrange)]} { 2707 2738 SendCmd [list map layer add $layer text ogr {} {} $info(ogr.url) $info(cache) $contentExpr $priorityExpr $fgR $fgG $fgB $bgR $bgG $bgB $style(-halowidth) $style(-fontsize) $style(-removedupes) $style(-declutter) $style(-align) $style(-xoffset) $style(-yoffset) $style(-minrange) $style(-maxrange)]
Note: See TracChangeset
for help on using the changeset viewer.