Revision 2604 org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/FLyrWMS.java
FLyrWMS.java | ||
---|---|---|
142 | 142 |
|
143 | 143 |
private static final GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
144 | 144 |
private static final Logger logger = LoggerFactory.getLogger(FLyrWMS.class); |
145 |
private boolean mustTileDraw = false; |
|
146 |
private boolean mustTilePrint = true; |
|
145 |
private boolean mustSplitRequest = false; |
|
147 | 146 |
private final int maxTileDrawWidth = 1023; |
148 | 147 |
private final int maxTileDrawHeight = 1023; |
149 | 148 |
private final int maxTilePrintWidth = 1023; |
... | ... | |
291 | 290 |
|
292 | 291 |
if (isWithinScale(scale)) { |
293 | 292 |
|
294 |
if(mustTileDraw) {
|
|
293 |
if(mustSplitRequest) {
|
|
295 | 294 |
Point2D p = viewPort.getOffset(); |
296 | 295 |
Rectangle r = new Rectangle((int) p.getX(), (int) p.getY(), viewPort.getImageWidth(), viewPort.getImageHeight()); |
297 | 296 |
Tiling tiles = new Tiling(maxTileDrawWidth, maxTileDrawHeight, r); |
... | ... | |
430 | 429 |
taskStatus.setAutoremove(true); |
431 | 430 |
|
432 | 431 |
if (isVisible() && isWithinScale(scale)){ |
433 |
if (!mustTilePrint) {
|
|
432 |
if (!mustSplitRequest) {
|
|
434 | 433 |
draw(null, g, viewPort, cancel,scale); |
435 | 434 |
} else { |
436 | 435 |
Tiling tiles = new Tiling(maxTilePrintWidth, maxTilePrintHeight, g.getClipBounds()); |
... | ... | |
636 | 635 |
} |
637 | 636 |
|
638 | 637 |
public boolean isTiled() { |
639 |
return mustTileDraw;
|
|
638 |
return mustSplitRequest;
|
|
640 | 639 |
} |
640 |
|
|
641 |
private void splitRequestCalculation(int width, int height) { |
|
642 |
mustSplitRequest = (!getDataStore().isTiled() && (width > 1023 || height > 1023)); |
|
643 |
} |
|
641 | 644 |
|
642 | 645 |
public ComposedLayer newComposedLayer() { |
643 | 646 |
Preferences prefs = Preferences.userRoot().node("gvsig.wms"); |
Also available in: Unified diff