remove vtm-jeo-desktop
This commit is contained in:
parent
04391815e4
commit
6f7ce36ec4
@ -1,23 +0,0 @@
|
|||||||
repositories {
|
|
||||||
// libgdx
|
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'maven'
|
|
||||||
apply plugin: 'application'
|
|
||||||
|
|
||||||
mainClassName = 'org.oscim.jeo.test.LayerTest'
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main.java.srcDirs = ['src']
|
|
||||||
main.resources.srcDirs = ['resources']
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile project(':vtm-jeo')
|
|
||||||
compile project(':vtm-desktop')
|
|
||||||
// compile project(':vtm-themes')
|
|
||||||
}
|
|
||||||
|
|
||||||
run { ignoreExitValue = true }
|
|
@ -1,69 +0,0 @@
|
|||||||
package org.oscim.jeo.test;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
|
|
||||||
import org.jeo.data.VectorDataset;
|
|
||||||
import org.jeo.map.Style;
|
|
||||||
import org.oscim.gdx.GdxMap;
|
|
||||||
import org.oscim.gdx.GdxMapApp;
|
|
||||||
import org.oscim.layers.JeoVectorLayer;
|
|
||||||
import org.oscim.layers.OSMIndoorLayer;
|
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
|
||||||
import org.oscim.test.JeoTest;
|
|
||||||
import org.oscim.tiling.source.bitmap.DefaultSources.StamenToner;
|
|
||||||
|
|
||||||
public class LayerTest extends GdxMap {
|
|
||||||
|
|
||||||
String PATH = "https://gist.github.com/anonymous/8960337/raw/overpass.geojson";
|
|
||||||
|
|
||||||
OSMIndoorLayer mIndoorLayer;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createLayers() {
|
|
||||||
mMap.setBackgroundMap(new BitmapTileLayer(mMap, new StamenToner()));
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
|
|
||||||
mMap.addTask(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
URL url = new URL(PATH);
|
|
||||||
URLConnection conn = url.openConnection();
|
|
||||||
InputStream is = conn.getInputStream();
|
|
||||||
|
|
||||||
VectorDataset data = JeoTest.readGeoJson(is);
|
|
||||||
Style style = JeoTest.getStyle();
|
|
||||||
mIndoorLayer = new OSMIndoorLayer(mMap, data, style);
|
|
||||||
mIndoorLayer.activeLevels[0] = true;
|
|
||||||
mIndoorLayer.activeLevels[1] = true;
|
|
||||||
mIndoorLayer.activeLevels[2] = true;
|
|
||||||
mIndoorLayer.activeLevels[3] = true;
|
|
||||||
|
|
||||||
mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
|
||||||
mMap.layers().add(mIndoorLayer);
|
|
||||||
|
|
||||||
mMap.updateMap(true);
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
|
||||||
|
|
||||||
//VectorDataset data = (VectorDataset) JeoTest.getJsonData("states.json", true);
|
|
||||||
//Style style = JeoTest.getStyle();
|
|
||||||
//mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
GdxMapApp.init();
|
|
||||||
GdxMapApp.run(new LayerTest(), null, 256);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
package org.oscim.jeo.test;
|
|
||||||
|
|
||||||
import org.oscim.gdx.GdxMapApp;
|
|
||||||
import org.oscim.layers.TileGridLayer;
|
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
|
||||||
import org.oscim.renderer.MapRenderer;
|
|
||||||
import org.oscim.theme.carto.RenderTheme;
|
|
||||||
import org.oscim.tiling.source.UrlTileSource;
|
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
|
||||||
|
|
||||||
public class ThemeTest extends GdxMapApp {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
GdxMapApp.init();
|
|
||||||
GdxMapApp.run(new ThemeTest(), null, 256);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void createLayers() {
|
|
||||||
UrlTileSource ts = new OSciMap4TileSource();
|
|
||||||
|
|
||||||
VectorTileLayer l = mMap.setBaseMap(ts);
|
|
||||||
|
|
||||||
l.setRenderTheme(new RenderTheme());
|
|
||||||
|
|
||||||
MapRenderer.setBackgroundColor(0xffcccccc);
|
|
||||||
|
|
||||||
// mMap.getLayers().add(new LabelLayer(mMap,
|
|
||||||
// mMapLayer.getTileLayer()));
|
|
||||||
// mMap.getLayers().add(new JeoMapLayer(mMap));
|
|
||||||
|
|
||||||
mMap.layers().add(new TileGridLayer(mMap));
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user