Changeset 4538 in josm


Ignore:
Timestamp:
2011-10-23T12:17:50+02:00 (9 years ago)
Author:
stoecker
Message:

support {header} pattern also for TMS

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r4531 r4538  
    2424import java.util.List;
    2525import java.util.Map;
     26import java.util.Map.Entry;
    2627import java.util.regex.Matcher;
    2728import java.util.regex.Pattern;
     
    108109    protected MemoryTileCache tileCache;
    109110    protected TileSource tileSource;
    110     protected TileLoader tileLoader;
     111    protected OsmTileLoader tileLoader;
    111112    JobDispatcher jobDispatcher = JobDispatcher.getInstance();
    112113
     
    276277        if (tileLoader == null) {
    277278            tileLoader = new OsmTileLoader(this);
     279        }
     280        tileLoader.timeoutConnect = Main.pref.getInteger("socket.timeout.connect",15) * 1000;
     281        tileLoader.timeoutRead = Main.pref.getInteger("socket.timeout.read", 30) * 1000;
     282        if (tileSource instanceof TemplatedTMSTileSource) {
     283            for(Entry<String, String> e : ((TemplatedTMSTileSource)tileSource).getHeaders().entrySet()) {
     284                tileLoader.headers.put(e.getKey(), e.getValue());
     285            }
    278286        }
    279287    }
Note: See TracChangeset for help on using the changeset viewer.