Changeset 3742 for print

Show
Ignore:
Timestamp:
03/03/11 12:41:37 (15 months ago)
Author:
jeichar
Message:

removed assumption that format has to have a ;

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • print/trunk/src/main/java/org/mapfish/print/map/readers/TmsMapReader.java

    r3397 r3742  
    4646        format = params.getString("format"); 
    4747        serviceVersion = "1.0.0"; 
    48         extension = format.substring(0,format.indexOf(";")); 
     48        int formatSemicolon = format.indexOf(";"); 
     49        if(formatSemicolon > 0) { 
     50          extension = format.substring(0,formatSemicolon).trim(); 
     51        } else { 
     52          extension = format.trim(); 
     53        } 
    4954        layerName = params.getString("layer"); 
    5055        tileCacheLayerInfo = new TmsLayerInfo(params.getJSONArray("resolutions"), tileSize.getInt(0), tileSize.getInt(1), maxExtent.getFloat(0), maxExtent.getFloat(1), maxExtent.getFloat(2), maxExtent.getFloat(3), extension);