diff --git a/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java b/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java
index 77b1456b..a23ff659 100644
--- a/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java
+++ b/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java
@@ -68,6 +68,7 @@ public class GdxMapApp extends GdxMap {
cfg.samples = 2;
cfg.foregroundFPS = 30;
cfg.backgroundFPS = 10;
+ cfg.forceExit = false;
return cfg;
}
@@ -79,4 +80,9 @@ public class GdxMapApp extends GdxMap {
mMap.setMapPosition(0, 0, 1 << 2);
}
+
+ @Override
+ public void dispose() {
+ System.exit(0);
+ }
}
diff --git a/vtm-desktop/src/org/oscim/gdx/GdxMapImpl.java b/vtm-desktop/src/org/oscim/gdx/GdxMapImpl.java
new file mode 100644
index 00000000..bba70f0e
--- /dev/null
+++ b/vtm-desktop/src/org/oscim/gdx/GdxMapImpl.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 devemux86
+ *
+ * This program is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with
+ * this program. If not, see .
+ */
+package org.oscim.gdx;
+
+public class GdxMapImpl extends GdxMap {
+ @Override
+ public void dispose() {
+ System.exit(0);
+ }
+}
diff --git a/vtm-playground/src/org/oscim/stuff/MapzenTest.java b/vtm-playground/src/org/oscim/stuff/MapzenTest.java
index ce347426..3ec53674 100644
--- a/vtm-playground/src/org/oscim/stuff/MapzenTest.java
+++ b/vtm-playground/src/org/oscim/stuff/MapzenTest.java
@@ -16,8 +16,8 @@
*/
package org.oscim.stuff;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -25,7 +25,7 @@ import org.oscim.theme.VtmThemes;
import org.oscim.tiling.source.UrlTileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
-public class MapzenTest extends GdxMap {
+public class MapzenTest extends GdxMapImpl {
@Override
public void createLayers() {
diff --git a/vtm-playground/src/org/oscim/test/AnimatorTest.java b/vtm-playground/src/org/oscim/test/AnimatorTest.java
index dbf59832..4d02eec3 100644
--- a/vtm-playground/src/org/oscim/test/AnimatorTest.java
+++ b/vtm-playground/src/org/oscim/test/AnimatorTest.java
@@ -3,13 +3,13 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
import org.oscim.core.BoundingBox;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
-public class AnimatorTest extends GdxMap {
+public class AnimatorTest extends GdxMapImpl {
@Override
public void createLayers() {
diff --git a/vtm-playground/src/org/oscim/test/BitmapLayerTest.java b/vtm-playground/src/org/oscim/test/BitmapLayerTest.java
index 9c46530e..243e2432 100644
--- a/vtm-playground/src/org/oscim/test/BitmapLayerTest.java
+++ b/vtm-playground/src/org/oscim/test/BitmapLayerTest.java
@@ -18,13 +18,13 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.source.bitmap.DefaultSources;
-public class BitmapLayerTest extends GdxMap {
+public class BitmapLayerTest extends GdxMapImpl {
private BitmapTileLayer mLayer = null;
private BitmapTileLayer mShaded = null;
diff --git a/vtm-playground/src/org/oscim/test/CircleTest.java b/vtm-playground/src/org/oscim/test/CircleTest.java
index 3a448e05..f4b0c1b9 100644
--- a/vtm-playground/src/org/oscim/test/CircleTest.java
+++ b/vtm-playground/src/org/oscim/test/CircleTest.java
@@ -17,8 +17,8 @@ package org.oscim.test;
import org.oscim.backend.GLAdapter;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -26,7 +26,7 @@ import org.oscim.renderer.MapRenderer;
import org.oscim.renderer.bucket.CircleBucket;
import org.oscim.theme.styles.CircleStyle;
-public class CircleTest extends GdxMap {
+public class CircleTest extends GdxMapImpl {
private final GeometryBuffer geom = new GeometryBuffer(2, 1);
private final Renderer renderer = new Renderer();
diff --git a/vtm-playground/src/org/oscim/test/ExternalRenderThemeTest.java b/vtm-playground/src/org/oscim/test/ExternalRenderThemeTest.java
index cd7a60eb..f01f645c 100644
--- a/vtm-playground/src/org/oscim/test/ExternalRenderThemeTest.java
+++ b/vtm-playground/src/org/oscim/test/ExternalRenderThemeTest.java
@@ -18,8 +18,8 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.renderer.MapRenderer;
@@ -28,7 +28,7 @@ import org.oscim.theme.IRenderTheme.ThemeException;
import org.oscim.theme.ThemeLoader;
import org.oscim.tiling.source.mapfile.MapFileTileSource;
-public class ExternalRenderThemeTest extends GdxMap {
+public class ExternalRenderThemeTest extends GdxMapImpl {
VectorTileLayer mapLayer;
diff --git a/vtm-playground/src/org/oscim/test/GdxSpriteBatchTest.java b/vtm-playground/src/org/oscim/test/GdxSpriteBatchTest.java
index e4112371..eced4eaf 100644
--- a/vtm-playground/src/org/oscim/test/GdxSpriteBatchTest.java
+++ b/vtm-playground/src/org/oscim/test/GdxSpriteBatchTest.java
@@ -27,8 +27,8 @@ import com.badlogic.gdx.utils.viewport.Viewport;
import org.oscim.backend.GL;
import org.oscim.core.Point;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.renderer.GLState;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.TileSource;
@@ -36,7 +36,7 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import static org.oscim.backend.GLAdapter.gl;
-public class GdxSpriteBatchTest extends GdxMap {
+public class GdxSpriteBatchTest extends GdxMapImpl {
private double latitude = 47.1970869;
private double longitude = 18.4398422;
private double scale = 1 << 17;
diff --git a/vtm-playground/src/org/oscim/test/HairLineTest.java b/vtm-playground/src/org/oscim/test/HairLineTest.java
index 4956085a..c8a2dd7b 100644
--- a/vtm-playground/src/org/oscim/test/HairLineTest.java
+++ b/vtm-playground/src/org/oscim/test/HairLineTest.java
@@ -19,8 +19,8 @@ package org.oscim.test;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.core.GeometryBuffer;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -32,7 +32,7 @@ import org.oscim.theme.styles.AreaStyle;
import org.oscim.theme.styles.LineStyle;
import org.oscim.theme.styles.LineStyle.LineBuilder;
-public class HairLineTest extends GdxMap {
+public class HairLineTest extends GdxMapImpl {
static GeometryBuffer createLine(float r) {
GeometryBuffer in = new GeometryBuffer(100, 2);
diff --git a/vtm-playground/src/org/oscim/test/LineRenderTest.java b/vtm-playground/src/org/oscim/test/LineRenderTest.java
index aa990949..a6a2f6d3 100644
--- a/vtm-playground/src/org/oscim/test/LineRenderTest.java
+++ b/vtm-playground/src/org/oscim/test/LineRenderTest.java
@@ -23,8 +23,8 @@ import org.oscim.backend.CanvasAdapter;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.core.GeometryBuffer;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -36,7 +36,7 @@ import org.oscim.theme.styles.LineStyle;
import java.io.IOException;
-public class LineRenderTest extends GdxMap {
+public class LineRenderTest extends GdxMapImpl {
GeometryBuffer mGeom = new GeometryBuffer(2, 1);
GeometryBuffer mLine = new GeometryBuffer(2, 1);
diff --git a/vtm-playground/src/org/oscim/test/LineTest.java b/vtm-playground/src/org/oscim/test/LineTest.java
index 5dcce07a..9295d73d 100644
--- a/vtm-playground/src/org/oscim/test/LineTest.java
+++ b/vtm-playground/src/org/oscim/test/LineTest.java
@@ -5,8 +5,8 @@ import com.badlogic.gdx.Input;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -14,7 +14,7 @@ import org.oscim.renderer.MapRenderer;
import org.oscim.renderer.bucket.LineBucket;
import org.oscim.theme.styles.LineStyle;
-public class LineTest extends GdxMap {
+public class LineTest extends GdxMapImpl {
@Override
protected boolean onKeyDown(int keycode) {
diff --git a/vtm-playground/src/org/oscim/test/MapsforgeMultiTest.java b/vtm-playground/src/org/oscim/test/MapsforgeMultiTest.java
index 9143394d..f55a0c50 100644
--- a/vtm-playground/src/org/oscim/test/MapsforgeMultiTest.java
+++ b/vtm-playground/src/org/oscim/test/MapsforgeMultiTest.java
@@ -16,8 +16,8 @@ package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -29,7 +29,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-public class MapsforgeMultiTest extends GdxMap {
+public class MapsforgeMultiTest extends GdxMapImpl {
private final List mapFiles;
diff --git a/vtm-playground/src/org/oscim/test/MapsforgeTest.java b/vtm-playground/src/org/oscim/test/MapsforgeTest.java
index 2f6c7fbf..1894017d 100644
--- a/vtm-playground/src/org/oscim/test/MapsforgeTest.java
+++ b/vtm-playground/src/org/oscim/test/MapsforgeTest.java
@@ -18,8 +18,8 @@ package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -36,7 +36,7 @@ import org.oscim.tiling.source.mapfile.MapInfo;
import java.io.File;
-public class MapsforgeTest extends GdxMap {
+public class MapsforgeTest extends GdxMapImpl {
private File mapFile;
diff --git a/vtm-playground/src/org/oscim/test/RuleVisitorTest.java b/vtm-playground/src/org/oscim/test/RuleVisitorTest.java
index e9a6c06a..0246681b 100644
--- a/vtm-playground/src/org/oscim/test/RuleVisitorTest.java
+++ b/vtm-playground/src/org/oscim/test/RuleVisitorTest.java
@@ -18,8 +18,8 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.theme.RenderTheme;
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
import static org.oscim.utils.ColorUtil.saturate;
-public class RuleVisitorTest extends GdxMap {
+public class RuleVisitorTest extends GdxMapImpl {
final Logger log = LoggerFactory.getLogger(RuleVisitorTest.class);
RenderTheme mTheme;
diff --git a/vtm-playground/src/org/oscim/test/ThemeBuilderTest.java b/vtm-playground/src/org/oscim/test/ThemeBuilderTest.java
index 964ba397..01415a3e 100644
--- a/vtm-playground/src/org/oscim/test/ThemeBuilderTest.java
+++ b/vtm-playground/src/org/oscim/test/ThemeBuilderTest.java
@@ -18,8 +18,8 @@ package org.oscim.test;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.theme.RenderTheme;
@@ -27,7 +27,7 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ThemeBuilderTest extends GdxMap {
+public class ThemeBuilderTest extends GdxMapImpl {
final Logger log = LoggerFactory.getLogger(S3DBLayerTest.class);
diff --git a/vtm-playground/src/org/oscim/test/gdx/poi3d/Gdx3DTest.java b/vtm-playground/src/org/oscim/test/gdx/poi3d/Gdx3DTest.java
index 616a4ceb..9fb96e62 100644
--- a/vtm-playground/src/org/oscim/test/gdx/poi3d/Gdx3DTest.java
+++ b/vtm-playground/src/org/oscim/test/gdx/poi3d/Gdx3DTest.java
@@ -16,8 +16,8 @@
*/
package org.oscim.test.gdx.poi3d;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -26,7 +26,7 @@ import org.oscim.theme.VtmThemes;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
-public class Gdx3DTest extends GdxMap {
+public class Gdx3DTest extends GdxMapImpl {
@Override
public void createLayers() {
diff --git a/vtm-playground/src/org/oscim/test/jeo/LayerTest.java b/vtm-playground/src/org/oscim/test/jeo/LayerTest.java
index 97ace9d6..c2b299fd 100644
--- a/vtm-playground/src/org/oscim/test/jeo/LayerTest.java
+++ b/vtm-playground/src/org/oscim/test/jeo/LayerTest.java
@@ -20,8 +20,8 @@ package org.oscim.test.jeo;
import org.jeo.map.Style;
import org.jeo.vector.VectorDataset;
import org.oscim.backend.canvas.Color;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.JeoVectorLayer;
import org.oscim.layers.OSMIndoorLayer;
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
@@ -35,7 +35,7 @@ import java.net.URLConnection;
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
-public class LayerTest extends GdxMap {
+public class LayerTest extends GdxMapImpl {
// from http://overpass-turbo.eu/s/2vp
String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
diff --git a/vtm-playground/src/org/oscim/test/renderer/AtlasTest.java b/vtm-playground/src/org/oscim/test/renderer/AtlasTest.java
index 0e1ae53f..a0414fc2 100644
--- a/vtm-playground/src/org/oscim/test/renderer/AtlasTest.java
+++ b/vtm-playground/src/org/oscim/test/renderer/AtlasTest.java
@@ -18,8 +18,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
import java.util.Arrays;
-public class AtlasTest extends GdxMap {
+public class AtlasTest extends GdxMapImpl {
@Override
protected void createLayers() {
diff --git a/vtm-playground/src/org/oscim/test/renderer/BezierTest.java b/vtm-playground/src/org/oscim/test/renderer/BezierTest.java
index 309d77f1..2d18a745 100644
--- a/vtm-playground/src/org/oscim/test/renderer/BezierTest.java
+++ b/vtm-playground/src/org/oscim/test/renderer/BezierTest.java
@@ -19,8 +19,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
import org.oscim.core.Point;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -30,7 +30,7 @@ import org.oscim.utils.geom.BezierPath;
import java.util.List;
-public class BezierTest extends GdxMap {
+public class BezierTest extends GdxMapImpl {
@Override
protected void createLayers() {
diff --git a/vtm-playground/src/org/oscim/test/renderer/HexagonRenderTest.java b/vtm-playground/src/org/oscim/test/renderer/HexagonRenderTest.java
index eb278a16..048bfd4d 100644
--- a/vtm-playground/src/org/oscim/test/renderer/HexagonRenderTest.java
+++ b/vtm-playground/src/org/oscim/test/renderer/HexagonRenderTest.java
@@ -18,8 +18,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.GL;
import org.oscim.backend.canvas.Color;
-import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
+import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.BufferObject;
@@ -35,7 +35,7 @@ import java.nio.FloatBuffer;
import static org.oscim.backend.GLAdapter.gl;
import static org.oscim.renderer.MapRenderer.COORD_SCALE;
-public class HexagonRenderTest extends GdxMap {
+public class HexagonRenderTest extends GdxMapImpl {
@Override
protected void createLayers() {