poi3D enhancements for playground (#607)
This commit is contained in:
parent
2784d78737
commit
62132937da
vtm-playground/src/org/oscim/test
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
* 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/>.
|
* 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.core.MapPosition;
|
||||||
import org.oscim.gdx.GdxMapApp;
|
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.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
import org.oscim.renderer.MapRenderer;
|
import org.oscim.renderer.MapRenderer;
|
||||||
import org.oscim.test.MapPreferences;
|
|
||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
import org.oscim.tiling.source.OkHttpEngine;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||||
|
|
||||||
public class Gdx3DTest extends GdxMapApp {
|
public class GdxPoi3DTest extends GdxMapApp {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createLayers() {
|
public void createLayers() {
|
||||||
@ -82,6 +81,6 @@ public class Gdx3DTest extends GdxMapApp {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
GdxMapApp.init();
|
||||||
GdxMapApp.run(new Gdx3DTest());
|
GdxMapApp.run(new GdxPoi3DTest());
|
||||||
}
|
}
|
||||||
}
|
}
|
32
vtm-playground/src/org/oscim/test/MapsforgePoi3DTest.java
Normal file
32
vtm-playground/src/org/oscim/test/MapsforgePoi3DTest.java
Normal 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)));
|
||||||
|
}
|
||||||
|
}
|
@ -21,7 +21,7 @@ import java.io.File;
|
|||||||
public class MapsforgeS3DBTest extends MapsforgeTest {
|
public class MapsforgeS3DBTest extends MapsforgeTest {
|
||||||
|
|
||||||
private MapsforgeS3DBTest(File mapFile) {
|
private MapsforgeS3DBTest(File mapFile) {
|
||||||
super(mapFile, true);
|
super(mapFile, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016-2018 devemux86
|
* Copyright 2016-2018 devemux86
|
||||||
|
* Copyright 2018 Gustl22
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* 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.MapPosition;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
import org.oscim.gdx.GdxMapApp;
|
import org.oscim.gdx.GdxMapApp;
|
||||||
|
import org.oscim.gdx.poi3d.Poi3DLayer;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.buildings.S3DBLayer;
|
import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
@ -39,15 +41,17 @@ import java.io.File;
|
|||||||
public class MapsforgeTest extends GdxMapApp {
|
public class MapsforgeTest extends GdxMapApp {
|
||||||
|
|
||||||
private File mapFile;
|
private File mapFile;
|
||||||
|
private boolean poi3d;
|
||||||
private boolean s3db;
|
private boolean s3db;
|
||||||
|
|
||||||
MapsforgeTest(File mapFile) {
|
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.mapFile = mapFile;
|
||||||
this.s3db = s3db;
|
this.s3db = s3db;
|
||||||
|
this.poi3d = poi3d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -63,6 +67,10 @@ public class MapsforgeTest extends GdxMapApp {
|
|||||||
mMap.layers().add(new S3DBLayer(mMap, l));
|
mMap.layers().add(new S3DBLayer(mMap, l));
|
||||||
else
|
else
|
||||||
mMap.layers().add(new BuildingLayer(mMap, l));
|
mMap.layers().add(new BuildingLayer(mMap, l));
|
||||||
|
|
||||||
|
if (poi3d)
|
||||||
|
mMap.layers().add(new Poi3DLayer(mMap, l));
|
||||||
|
|
||||||
mMap.layers().add(new LabelLayer(mMap, l));
|
mMap.layers().add(new LabelLayer(mMap, l));
|
||||||
|
|
||||||
DefaultMapScaleBar mapScaleBar = new DefaultMapScaleBar(mMap);
|
DefaultMapScaleBar mapScaleBar = new DefaultMapScaleBar(mMap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user