From e224a7cf5b04d81304a7ff8ed5288effd1b0ac91 Mon Sep 17 00:00:00 2001 From: Emux Date: Wed, 2 Nov 2016 14:06:36 +0200 Subject: [PATCH] Samples: minor improvements #32 --- vtm-desktop/src/org/oscim/gdx/GdxMapApp.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java b/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java index deec7162..9f892534 100644 --- a/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java +++ b/vtm-desktop/src/org/oscim/gdx/GdxMapApp.java @@ -46,7 +46,7 @@ public class GdxMapApp extends GdxMap { public static void main(String[] args) { init(); - new LwjglApplication(new GdxMapApp(), getConfig()); + new LwjglApplication(new GdxMapApp(), getConfig(null)); } public static void run(GdxMap map) { @@ -56,13 +56,13 @@ public class GdxMapApp extends GdxMap { public static void run(GdxMap map, LwjglApplicationConfiguration config, int tileSize) { Tile.SIZE = FastMath.clamp(tileSize, 128, 512); - new LwjglApplication(map, (config == null ? getConfig() : config)); + new LwjglApplication(map, (config == null ? getConfig(map.getClass().getSimpleName()) : config)); } - static protected LwjglApplicationConfiguration getConfig() { + protected static LwjglApplicationConfiguration getConfig(String title) { LwjglApplicationConfiguration.disableAudio = true; LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); - cfg.title = "vtm-gdx"; + cfg.title = title != null ? title : "vtm-gdx"; cfg.width = 800; cfg.height = 600; cfg.stencil = 8; @@ -76,15 +76,8 @@ public class GdxMapApp extends GdxMap { public void createLayers() { TileSource tileSource = new OSciMap4TileSource(); - // TileSource tileSource = new MapFileTileSource(); - // tileSource.setOption("file", "/home/jeff/germany.map"); - initDefaultLayers(tileSource, false, true, true); - //mMap.getLayers().add(new BitmapTileLayer(mMap, new ImagicoLandcover(), 20)); - //mMap.getLayers().add(new BitmapTileLayer(mMap, new OSMTileSource(), 20)); - //mMap.getLayers().add(new BitmapTileLayer(mMap, new ArcGISWorldShaded(), 20)); - mMap.setMapPosition(0, 0, 1 << 2); } }