866 |
|
|
867 |
/** |
/** |
868 |
* Correct the aspect Ratio before we check the rest. Otherwise we might |
* Correct the aspect Ratio before we check the rest. Otherwise we might |
869 |
* easily fail. |
* easily fail. We allow to grow here, because we don't check against the maxExtend |
870 |
*/ |
*/ |
871 |
env = JTSUtil.fixAspectRatio(this.getBounds(), env, false); |
env = JTSUtil.fixAspectRatio(this.getBounds(), env, true); |
872 |
|
|
873 |
final double scale = env.getWidth() / getWidth(); |
final double scale = env.getWidth() / getWidth(); |
874 |
final double centerX = env.getMinX() + env.getWidth() / 2.; |
final double centerX = env.getMinX() + env.getWidth() / 2.; |
1076 |
public Envelope getMaxExtend() { |
public Envelope getMaxExtend() { |
1077 |
if (maxExtend == null) { |
if (maxExtend == null) { |
1078 |
try { |
try { |
1079 |
return fixAspectRatio( |
return JTSUtil.fixAspectRatio( |
1080 |
this.getBounds(), |
this.getBounds(), |
1081 |
// Kartenbereich um 10% vergroessern |
// Kartenbereich um 10% vergroessern |
1082 |
JTSUtil.expandEnvelope(context.getLayerBounds(), 0.1), |
JTSUtil.expandEnvelope(context.getLayerBounds(), 0.1), |