[Schmitzm-commits] r602 - in branches/1.0-gt2-2.6/src: schmitzm/geotools skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 8 12:15:02 CET 2009
Author: alfonx
Date: 2009-12-08 12:15:00 +0100 (Tue, 08 Dec 2009)
New Revision: 602
Modified:
branches/1.0-gt2-2.6/src/schmitzm/geotools/GTUtil.java
branches/1.0-gt2-2.6/src/skrueger/geotools/RenderingExecutor.java
branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java
Log:
* center the map to the mouse when zooming in
* removed debuggin gfrom renderingExecutor
* MEMORY_PRE_LOADING_KEY has been removed from GT
Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/GTUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/GTUtil.java 2009-12-02 18:29:55 UTC (rev 601)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/GTUtil.java 2009-12-08 11:15:00 UTC (rev 602)
@@ -366,15 +366,15 @@
defaultRendererHints.put(StreamingRenderer.OPTIMIZE_FTS_RENDERING_KEY,
Boolean.TRUE);
+//
+// if (renderer instanceof ShapefileRenderer) {
+// defaultRendererHints.put(StreamingRenderer.MEMORY_PRE_LOADING_KEY,
+// Boolean.TRUE);
+// } else {
+// defaultRendererHints.put(StreamingRenderer.MEMORY_PRE_LOADING_KEY,
+// Boolean.FALSE);
+// }
- if (renderer instanceof ShapefileRenderer) {
- defaultRendererHints.put(StreamingRenderer.MEMORY_PRE_LOADING_KEY,
- Boolean.TRUE);
- } else {
- defaultRendererHints.put(StreamingRenderer.MEMORY_PRE_LOADING_KEY,
- Boolean.FALSE);
- }
-
defaultRendererHints.put(StreamingRenderer.OPTIMIZED_DATA_LOADING_KEY,
Boolean.TRUE);
Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/RenderingExecutor.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/RenderingExecutor.java 2009-12-02 18:29:55 UTC (rev 601)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/RenderingExecutor.java 2009-12-08 11:15:00 UTC (rev 602)
@@ -124,7 +124,7 @@
long startT = System.currentTimeMillis();
try {
renderer.addRenderListener(this);
- LOGGER.debug("start rendering...");
+// LOGGER.debug("start rendering...");
// Clear the graphics context
graphics.setBackground(mapPane.getMapBackgroundColor());
Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java 2009-12-02 18:29:55 UTC (rev 601)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/XMapPane.java 2009-12-08 11:15:00 UTC (rev 602)
@@ -2399,10 +2399,12 @@
.getWidth()) / 2., (mapArea.getHeight() * zoomFaktor - mapArea
.getHeight()) / 2.);
- // // Move the newMapArea above the new center
- newMapArea.translate(gcenter.getX() - mapArea.centre().x, gcenter
- .getY()
- - mapArea.centre().y);
+ // // Move the newMapArea above the new center if we zoom in:
+ if (zoomFaktor >= 1) {
+ newMapArea.translate(gcenter.getX() - mapArea.centre().x, gcenter
+ .getY()
+ - mapArea.centre().y);
+ }
setMapArea(newMapArea);
}
More information about the Schmitzm-commits
mailing list