Changeset 6072 for trunk/gui


Ignore:
Timestamp:
Feb 28, 2016, 3:09:59 AM (9 years ago)
Author:
ldelgass
Message:

Send files to server for local/relative paths in stylesheet.

File:
1 edited

Legend:

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

    r6065 r6072  
    120120    private method Select {option x y}
    121121    private method SendFiles { path }
     122    private method SendStylesheetFiles { stylesheet }
    122123    private method SetHeading { {value 0} }
    123124    private method SetLayerOpacity { dataobj layer {value 100} }
     
    23962397}
    23972398
     2399itcl::body Rappture::MapViewer::SendStylesheetFiles { stylesheet } {
     2400    set files [Rappture::Map::getFilesFromStylesheet $stylesheet]
     2401    foreach file $files {
     2402        SendFiles $file
     2403    }
     2404}
     2405
    23982406itcl::body Rappture::MapViewer::SendFiles { path } {
    2399     if {[string range $path 0 7] != "local://"} {
     2407    set isRelative [expr {[string first "://" $path] < 0 &&
     2408                          [string index $path 0] != "/"}]
     2409    if {[string range $path 0 7] != "local://" &&
     2410       !$isRelative} {
    24002411        return
    24012412    }
    24022413    DebugTrace "Local path: $path"
    2403     set path [string range $path 8 end]
     2414    if {!$isRelative} {
     2415        set path [string range $path 8 end]
     2416    }
    24042417    set basename [file rootname $path]
    24052418    set files [glob -path $basename .*]
     
    25442557            set format ""
    25452558            set wfsType ""
     2559            SendStylesheetFiles $info(stylesheet)
    25462560            if { [info exists info(ogr.connection)] } {
    25472561                set cmd [list map layer add $tag feature db $format $info(ogr.layer) $info(ogr.connection) $info(cache) $info(stylesheet) $script $selectors]
Note: See TracChangeset for help on using the changeset viewer.