poi3D enhancements for playground (#607)

This commit is contained in:
Gustl22 2018-12-04 01:47:35 +01:00 committed by Emux
parent 2784d78737
commit 62132937da
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3
4 changed files with 46 additions and 7 deletions

View File

@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.test.gdx.poi3d;
package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.gdx.GdxMapApp;
@ -24,13 +24,12 @@ import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.test.MapPreferences;
import org.oscim.theme.VtmThemes;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.OkHttpEngine;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
public class Gdx3DTest extends GdxMapApp {
public class GdxPoi3DTest extends GdxMapApp {
@Override
public void createLayers() {
@ -82,6 +81,6 @@ public class Gdx3DTest extends GdxMapApp {
public static void main(String[] args) {
GdxMapApp.init();
GdxMapApp.run(new Gdx3DTest());
GdxMapApp.run(new GdxPoi3DTest());
}
}

View File

@ -0,0 +1,32 @@
/*
* Copyright 2018 devemux86
* Copyright 2018 Gustl22
*
* 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 <http://www.gnu.org/licenses/>.
*/
package org.oscim.test;
import org.oscim.gdx.GdxMapApp;
import java.io.File;
public class MapsforgePoi3DTest extends MapsforgeTest {
private MapsforgePoi3DTest(File mapFile) {
super(mapFile, false, true);
}
public static void main(String[] args) {
GdxMapApp.init();
GdxMapApp.run(new MapsforgePoi3DTest(getMapFile(args)));
}
}

View File

@ -21,7 +21,7 @@ import java.io.File;
public class MapsforgeS3DBTest extends MapsforgeTest {
private MapsforgeS3DBTest(File mapFile) {
super(mapFile, true);
super(mapFile, true, false);
}
public static void main(String[] args) {

View File

@ -1,5 +1,6 @@
/*
* Copyright 2016-2018 devemux86
* Copyright 2018 Gustl22
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -19,6 +20,7 @@ package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.poi3d.Poi3DLayer;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.buildings.S3DBLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
@ -39,15 +41,17 @@ import java.io.File;
public class MapsforgeTest extends GdxMapApp {
private File mapFile;
private boolean poi3d;
private boolean s3db;
MapsforgeTest(File mapFile) {
this(mapFile, false);
this(mapFile, false, false);
}
MapsforgeTest(File mapFile, boolean s3db) {
MapsforgeTest(File mapFile, boolean s3db, boolean poi3d) {
this.mapFile = mapFile;
this.s3db = s3db;
this.poi3d = poi3d;
}
@Override
@ -63,6 +67,10 @@ public class MapsforgeTest extends GdxMapApp {
mMap.layers().add(new S3DBLayer(mMap, l));
else
mMap.layers().add(new BuildingLayer(mMap, l));
if (poi3d)
mMap.layers().add(new Poi3DLayer(mMap, l));
mMap.layers().add(new LabelLayer(mMap, l));
DefaultMapScaleBar mapScaleBar = new DefaultMapScaleBar(mMap);