Disable vtm-jeo (#997)
This commit is contained in:
parent
5c5c08f5c4
commit
1207262c72
@ -7,6 +7,7 @@
|
|||||||
- MVT simplification [#956](https://github.com/mapsforge/vtm/pull/956)
|
- MVT simplification [#956](https://github.com/mapsforge/vtm/pull/956)
|
||||||
- `Parameters.SIMPLIFICATION_TOLERANCE`, `Parameters.SIMPLIFICATION_EXCEPTIONS`
|
- `Parameters.SIMPLIFICATION_TOLERANCE`, `Parameters.SIMPLIFICATION_EXCEPTIONS`
|
||||||
- libGDX 1.11.0 [#972](https://github.com/mapsforge/vtm/pull/972) [#977](https://github.com/mapsforge/vtm/pull/977)
|
- libGDX 1.11.0 [#972](https://github.com/mapsforge/vtm/pull/972) [#977](https://github.com/mapsforge/vtm/pull/977)
|
||||||
|
- Disable `vtm-jeo` [#997](https://github.com/mapsforge/vtm/pull/997)
|
||||||
- Minor improvements and bug fixes
|
- Minor improvements and bug fixes
|
||||||
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.19.0)
|
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.19.0)
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ include ':vtm-gdx-poi3d'
|
|||||||
include ':vtm-http'
|
include ':vtm-http'
|
||||||
include ':vtm-ios'
|
include ':vtm-ios'
|
||||||
include ':vtm-ios-example'
|
include ':vtm-ios-example'
|
||||||
include ':vtm-jeo'
|
//include ':vtm-jeo'
|
||||||
include ':vtm-json'
|
include ':vtm-json'
|
||||||
include ':vtm-jts'
|
include ':vtm-jts'
|
||||||
include ':vtm-models'
|
include ':vtm-models'
|
||||||
|
@ -51,9 +51,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".GdxPoi3DActivity"
|
android:name=".GdxPoi3DActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
<activity
|
<!--<activity
|
||||||
android:name=".JeoIndoorActivity"
|
android:name=".JeoIndoorActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />-->
|
||||||
<activity
|
<activity
|
||||||
android:name=".LineTexActivity"
|
android:name=".LineTexActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||||
|
@ -5,7 +5,7 @@ dependencies {
|
|||||||
implementation project(':vtm-android-mvt')
|
implementation project(':vtm-android-mvt')
|
||||||
implementation project(':vtm-extras')
|
implementation project(':vtm-extras')
|
||||||
implementation project(':vtm-http')
|
implementation project(':vtm-http')
|
||||||
implementation project(':vtm-jeo')
|
//implementation project(':vtm-jeo')
|
||||||
implementation project(':vtm-json')
|
implementation project(':vtm-json')
|
||||||
implementation project(':vtm-jts')
|
implementation project(':vtm-jts')
|
||||||
implementation project(':vtm-mvt')
|
implementation project(':vtm-mvt')
|
||||||
|
@ -15,171 +15,171 @@
|
|||||||
* 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.android.test;
|
//package org.oscim.android.test;
|
||||||
|
//
|
||||||
import android.content.Context;
|
//import android.content.Context;
|
||||||
import android.os.Bundle;
|
//import android.os.Bundle;
|
||||||
import android.view.View;
|
//import android.view.View;
|
||||||
import android.widget.Toast;
|
//import android.widget.Toast;
|
||||||
import android.widget.ToggleButton;
|
//import android.widget.ToggleButton;
|
||||||
import io.jeo.map.Style;
|
//import io.jeo.map.Style;
|
||||||
import io.jeo.vector.VectorDataset;
|
//import io.jeo.vector.VectorDataset;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
//import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.canvas.Color;
|
//import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.layers.OSMIndoorLayer;
|
//import org.oscim.layers.OSMIndoorLayer;
|
||||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
//import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
//import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
import org.oscim.test.JeoTest;
|
//import org.oscim.test.JeoTest;
|
||||||
import org.oscim.theme.VtmThemes;
|
//import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.theme.styles.TextStyle;
|
//import org.oscim.theme.styles.TextStyle;
|
||||||
import org.oscim.utils.IOUtils;
|
//import org.oscim.utils.IOUtils;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
|
//
|
||||||
import java.io.IOException;
|
//import java.io.IOException;
|
||||||
import java.io.InputStream;
|
//import java.io.InputStream;
|
||||||
import java.net.URL;
|
//import java.net.URL;
|
||||||
import java.net.URLConnection;
|
//import java.net.URLConnection;
|
||||||
import java.util.Arrays;
|
//import java.util.Arrays;
|
||||||
|
//
|
||||||
public class JeoIndoorActivity extends BaseMapActivity {
|
//public class JeoIndoorActivity extends BaseMapActivity {
|
||||||
public static final Logger log = LoggerFactory.getLogger(JeoIndoorActivity.class);
|
// public static final Logger log = LoggerFactory.getLogger(JeoIndoorActivity.class);
|
||||||
|
//
|
||||||
// from http://overpass-turbo.eu/s/2vp
|
// // from http://overpass-turbo.eu/s/2vp
|
||||||
String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
|
// String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
|
||||||
|
//
|
||||||
private OSMIndoorLayer mIndoorLayer;
|
// private OSMIndoorLayer mIndoorLayer;
|
||||||
|
//
|
||||||
public JeoIndoorActivity() {
|
// public JeoIndoorActivity() {
|
||||||
super(R.layout.jeo_indoor_map);
|
// super(R.layout.jeo_indoor_map);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
// public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
// super.onCreate(savedInstanceState);
|
||||||
|
//
|
||||||
mMap.addTask(new Runnable() {
|
// mMap.addTask(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
showToast("load data");
|
// showToast("load data");
|
||||||
InputStream is = null;
|
// InputStream is = null;
|
||||||
try {
|
// try {
|
||||||
// File file = new File(Environment.getExternalStorageDirectory()
|
// // File file = new File(Environment.getExternalStorageDirectory()
|
||||||
// .getAbsolutePath(), "osmindoor.json");
|
// // .getAbsolutePath(), "osmindoor.json");
|
||||||
// is = new FileInputStream(file);
|
// // is = new FileInputStream(file);
|
||||||
|
//
|
||||||
URL url = new URL(PATH);
|
// URL url = new URL(PATH);
|
||||||
URLConnection conn = url.openConnection();
|
// URLConnection conn = url.openConnection();
|
||||||
is = conn.getInputStream();
|
// is = conn.getInputStream();
|
||||||
loadJson(is);
|
// loadJson(is);
|
||||||
} catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
} finally {
|
// } finally {
|
||||||
IOUtils.closeQuietly(is);
|
// IOUtils.closeQuietly(is);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
mMap.setTheme(VtmThemes.DEFAULT);
|
// mMap.setTheme(VtmThemes.DEFAULT);
|
||||||
|
//
|
||||||
mMap.layers().add(new BuildingLayer(mMap, mBaseLayer));
|
// mMap.layers().add(new BuildingLayer(mMap, mBaseLayer));
|
||||||
mMap.layers().add(new LabelLayer(mMap, mBaseLayer));
|
// mMap.layers().add(new LabelLayer(mMap, mBaseLayer));
|
||||||
|
//
|
||||||
// String file = Environment.getExternalStorageDirectory().getAbsolutePath();
|
// // String file = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||||
// VectorDataset data = (VectorDataset) JeoTest.getJsonData(file + "/states.json", true);
|
// // VectorDataset data = (VectorDataset) JeoTest.getJsonData(file + "/states.json", true);
|
||||||
// Style style = JeoTest.getStyle();
|
// // Style style = JeoTest.getStyle();
|
||||||
// mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
// // mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
void loadJson(InputStream is) {
|
// void loadJson(InputStream is) {
|
||||||
showToast("got data");
|
// showToast("got data");
|
||||||
|
//
|
||||||
VectorDataset data = JeoTest.readGeoJson(is);
|
// VectorDataset data = JeoTest.readGeoJson(is);
|
||||||
Style style = JeoTest.getStyle();
|
// Style style = JeoTest.getStyle();
|
||||||
TextStyle textStyle = TextStyle.builder()
|
// TextStyle textStyle = TextStyle.builder()
|
||||||
.isCaption(true)
|
// .isCaption(true)
|
||||||
.fontSize(16 * CanvasAdapter.getScale()).color(Color.BLACK)
|
// .fontSize(16 * CanvasAdapter.getScale()).color(Color.BLACK)
|
||||||
.strokeWidth(2.2f * CanvasAdapter.getScale()).strokeColor(Color.WHITE)
|
// .strokeWidth(2.2f * CanvasAdapter.getScale()).strokeColor(Color.WHITE)
|
||||||
.build();
|
// .build();
|
||||||
mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
|
// mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
|
||||||
mMap.layers().add(mIndoorLayer);
|
// mMap.layers().add(mIndoorLayer);
|
||||||
|
//
|
||||||
showToast("data ready");
|
// showToast("data ready");
|
||||||
mMap.updateMap(true);
|
// mMap.updateMap(true);
|
||||||
|
//
|
||||||
mIndoorLayer.activeLevels[0] = true;
|
// mIndoorLayer.activeLevels[0] = true;
|
||||||
shift();
|
// shift();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void showToast(final String text) {
|
// public void showToast(final String text) {
|
||||||
final Context ctx = this;
|
// final Context ctx = this;
|
||||||
runOnUiThread(new Runnable() {
|
// runOnUiThread(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
Toast toast = Toast.makeText(ctx, text, Toast.LENGTH_SHORT);
|
// Toast toast = Toast.makeText(ctx, text, Toast.LENGTH_SHORT);
|
||||||
toast.show();
|
// toast.show();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
boolean mShift = true;
|
// boolean mShift = true;
|
||||||
|
//
|
||||||
public void shift() {
|
// public void shift() {
|
||||||
if (!mShift)
|
// if (!mShift)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
mMap.postDelayed(new Runnable() {
|
// mMap.postDelayed(new Runnable() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
for (int i = 0; i < 10; i++) {
|
// for (int i = 0; i < 10; i++) {
|
||||||
if (mIndoorLayer.activeLevels[i]) {
|
// if (mIndoorLayer.activeLevels[i]) {
|
||||||
mIndoorLayer.activeLevels[i] = false;
|
// mIndoorLayer.activeLevels[i] = false;
|
||||||
mIndoorLayer.activeLevels[(i + 1) % 9] = true;
|
// mIndoorLayer.activeLevels[(i + 1) % 9] = true;
|
||||||
mIndoorLayer.update();
|
// mIndoorLayer.update();
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
shift();
|
// shift();
|
||||||
}
|
// }
|
||||||
}, 200);
|
// }, 200);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
mShift = false;
|
// mShift = false;
|
||||||
|
//
|
||||||
if (mIndoorLayer == null)
|
// if (mIndoorLayer == null)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
int i = 0;
|
// int i = 0;
|
||||||
|
//
|
||||||
if (v instanceof ToggleButton) {
|
// if (v instanceof ToggleButton) {
|
||||||
ToggleButton b = (ToggleButton) v;
|
// ToggleButton b = (ToggleButton) v;
|
||||||
i = (b.getTextOn().charAt(0) - '0') + 1;
|
// i = (b.getTextOn().charAt(0) - '0') + 1;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (i < 0 || i > 9)
|
// if (i < 0 || i > 9)
|
||||||
i = 0;
|
// i = 0;
|
||||||
|
//
|
||||||
mIndoorLayer.activeLevels[i] ^= true;
|
// mIndoorLayer.activeLevels[i] ^= true;
|
||||||
if (v instanceof ToggleButton)
|
// if (v instanceof ToggleButton)
|
||||||
((ToggleButton) v).setChecked(mIndoorLayer.activeLevels[i]);
|
// ((ToggleButton) v).setChecked(mIndoorLayer.activeLevels[i]);
|
||||||
log.debug(Arrays.toString(mIndoorLayer.activeLevels));
|
// log.debug(Arrays.toString(mIndoorLayer.activeLevels));
|
||||||
mIndoorLayer.update();
|
// mIndoorLayer.update();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected void onStop() {
|
// protected void onStop() {
|
||||||
super.onStop();
|
// super.onStop();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected void onResume() {
|
// protected void onResume() {
|
||||||
super.onResume();
|
// super.onResume();
|
||||||
|
//
|
||||||
/* ignore saved position */
|
// /* ignore saved position */
|
||||||
//mMap.setMapPosition(49.417, 8.673, 1 << 17);
|
// //mMap.setMapPosition(49.417, 8.673, 1 << 17);
|
||||||
mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
// mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
@ -121,7 +121,7 @@ public class Samples extends Activity {
|
|||||||
linearLayout.addView(createLabel("Experiments"));
|
linearLayout.addView(createLabel("Experiments"));
|
||||||
linearLayout.addView(createButton(ReverseGeocodeActivity.class));
|
linearLayout.addView(createButton(ReverseGeocodeActivity.class));
|
||||||
linearLayout.addView(createButton(ThemeStylerActivity.class));
|
linearLayout.addView(createButton(ThemeStylerActivity.class));
|
||||||
linearLayout.addView(createButton(JeoIndoorActivity.class));
|
//linearLayout.addView(createButton(JeoIndoorActivity.class));
|
||||||
linearLayout.addView(createButton(GdxPoi3DActivity.class));
|
linearLayout.addView(createButton(GdxPoi3DActivity.class));
|
||||||
linearLayout.addView(createButton(OverpassActivity.class));
|
linearLayout.addView(createButton(OverpassActivity.class));
|
||||||
linearLayout.addView(createButton(DraggableMarkerOverlayActivity.class));
|
linearLayout.addView(createButton(DraggableMarkerOverlayActivity.class));
|
||||||
|
@ -8,7 +8,7 @@ dependencies {
|
|||||||
implementation project(':vtm-extras')
|
implementation project(':vtm-extras')
|
||||||
implementation project(':vtm-gdx-poi3d')
|
implementation project(':vtm-gdx-poi3d')
|
||||||
implementation project(':vtm-http')
|
implementation project(':vtm-http')
|
||||||
implementation project(':vtm-jeo')
|
//implementation project(':vtm-jeo')
|
||||||
implementation project(':vtm-json')
|
implementation project(':vtm-json')
|
||||||
implementation project(':vtm-jts')
|
implementation project(':vtm-jts')
|
||||||
implementation project(':vtm-models')
|
implementation project(':vtm-models')
|
||||||
|
@ -15,78 +15,78 @@
|
|||||||
* 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.jeo;
|
//package org.oscim.test.jeo;
|
||||||
|
//
|
||||||
import io.jeo.map.Style;
|
//import io.jeo.map.Style;
|
||||||
import io.jeo.vector.VectorDataset;
|
//import io.jeo.vector.VectorDataset;
|
||||||
import org.oscim.backend.canvas.Color;
|
//import org.oscim.backend.canvas.Color;
|
||||||
import org.oscim.gdx.GdxMapApp;
|
//import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.JeoVectorLayer;
|
//import org.oscim.layers.JeoVectorLayer;
|
||||||
import org.oscim.layers.OSMIndoorLayer;
|
//import org.oscim.layers.OSMIndoorLayer;
|
||||||
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
//import org.oscim.layers.tile.bitmap.BitmapTileLayer;
|
||||||
import org.oscim.test.JeoTest;
|
//import org.oscim.test.JeoTest;
|
||||||
import org.oscim.theme.styles.TextStyle;
|
//import org.oscim.theme.styles.TextStyle;
|
||||||
|
//
|
||||||
import java.io.IOException;
|
//import java.io.IOException;
|
||||||
import java.io.InputStream;
|
//import java.io.InputStream;
|
||||||
import java.net.URL;
|
//import java.net.URL;
|
||||||
import java.net.URLConnection;
|
//import java.net.URLConnection;
|
||||||
|
//
|
||||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
//import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||||
|
//
|
||||||
public class LayerTest extends GdxMapApp {
|
//public class LayerTest extends GdxMapApp {
|
||||||
|
//
|
||||||
// from http://overpass-turbo.eu/s/2vp
|
// // from http://overpass-turbo.eu/s/2vp
|
||||||
String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
|
// String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
|
||||||
|
//
|
||||||
private OSMIndoorLayer mIndoorLayer;
|
// private OSMIndoorLayer mIndoorLayer;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void createLayers() {
|
// public void createLayers() {
|
||||||
mMap.setBaseMap(new BitmapTileLayer(mMap, STAMEN_TONER.build()));
|
// mMap.setBaseMap(new BitmapTileLayer(mMap, STAMEN_TONER.build()));
|
||||||
|
//
|
||||||
mMap.addTask(new Runnable() {
|
// mMap.addTask(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
try {
|
// try {
|
||||||
URL url = new URL(PATH);
|
// URL url = new URL(PATH);
|
||||||
URLConnection conn = url.openConnection();
|
// URLConnection conn = url.openConnection();
|
||||||
InputStream is = conn.getInputStream();
|
// InputStream is = conn.getInputStream();
|
||||||
|
//
|
||||||
VectorDataset data = JeoTest.readGeoJson(is);
|
// VectorDataset data = JeoTest.readGeoJson(is);
|
||||||
Style style = JeoTest.getStyle();
|
// Style style = JeoTest.getStyle();
|
||||||
TextStyle textStyle = TextStyle.builder()
|
// TextStyle textStyle = TextStyle.builder()
|
||||||
.isCaption(true)
|
// .isCaption(true)
|
||||||
.fontSize(16).color(Color.BLACK)
|
// .fontSize(16).color(Color.BLACK)
|
||||||
.strokeWidth(2.2f).strokeColor(Color.WHITE)
|
// .strokeWidth(2.2f).strokeColor(Color.WHITE)
|
||||||
.build();
|
// .build();
|
||||||
mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
|
// mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
|
||||||
mIndoorLayer.activeLevels[0] = true;
|
// mIndoorLayer.activeLevels[0] = true;
|
||||||
mIndoorLayer.activeLevels[1] = true;
|
// mIndoorLayer.activeLevels[1] = true;
|
||||||
mIndoorLayer.activeLevels[2] = true;
|
// mIndoorLayer.activeLevels[2] = true;
|
||||||
mIndoorLayer.activeLevels[3] = true;
|
// mIndoorLayer.activeLevels[3] = true;
|
||||||
|
//
|
||||||
mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
// mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
||||||
mMap.layers().add(mIndoorLayer);
|
// mMap.layers().add(mIndoorLayer);
|
||||||
|
//
|
||||||
mMap.updateMap(true);
|
// mMap.updateMap(true);
|
||||||
|
//
|
||||||
} catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
// mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
|
||||||
|
//
|
||||||
//VectorDataset data = (VectorDataset) JeoTest.getJsonData("states.json", true);
|
// //VectorDataset data = (VectorDataset) JeoTest.getJsonData("states.json", true);
|
||||||
//Style style = JeoTest.getStyle();
|
// //Style style = JeoTest.getStyle();
|
||||||
//mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
// //mMap.layers().add(new JeoVectorLayer(mMap, data, style));
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static void main(String[] args) {
|
// public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
// GdxMapApp.init();
|
||||||
GdxMapApp.run(new LayerTest(), null, 256);
|
// GdxMapApp.run(new LayerTest(), null, 256);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
@ -14,37 +14,37 @@
|
|||||||
* 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.jeo;
|
//package org.oscim.test.jeo;
|
||||||
|
//
|
||||||
import org.oscim.gdx.GdxMapApp;
|
//import org.oscim.gdx.GdxMapApp;
|
||||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
//import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||||
import org.oscim.renderer.MapRenderer;
|
//import org.oscim.renderer.MapRenderer;
|
||||||
import org.oscim.theme.carto.RenderTheme;
|
//import org.oscim.theme.carto.RenderTheme;
|
||||||
import org.oscim.tiling.source.OkHttpEngine;
|
//import org.oscim.tiling.source.OkHttpEngine;
|
||||||
import org.oscim.tiling.source.UrlTileSource;
|
//import org.oscim.tiling.source.UrlTileSource;
|
||||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
//import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||||
|
//
|
||||||
public class ThemeTest extends GdxMapApp {
|
//public class ThemeTest extends GdxMapApp {
|
||||||
|
//
|
||||||
public static void main(String[] args) {
|
// public static void main(String[] args) {
|
||||||
GdxMapApp.init();
|
// GdxMapApp.init();
|
||||||
GdxMapApp.run(new ThemeTest(), null, 256);
|
// GdxMapApp.run(new ThemeTest(), null, 256);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void createLayers() {
|
// public void createLayers() {
|
||||||
UrlTileSource ts = OSciMap4TileSource.builder()
|
// UrlTileSource ts = OSciMap4TileSource.builder()
|
||||||
.httpFactory(new OkHttpEngine.OkHttpFactory())
|
// .httpFactory(new OkHttpEngine.OkHttpFactory())
|
||||||
.build();
|
// .build();
|
||||||
|
//
|
||||||
VectorTileLayer l = mMap.setBaseMap(ts);
|
// VectorTileLayer l = mMap.setBaseMap(ts);
|
||||||
|
//
|
||||||
l.setTheme(new RenderTheme());
|
// l.setTheme(new RenderTheme());
|
||||||
|
//
|
||||||
MapRenderer.setBackgroundColor(0xffcccccc);
|
// MapRenderer.setBackgroundColor(0xffcccccc);
|
||||||
|
//
|
||||||
// mMap.getLayers().add(new LabelLayer(mMap,
|
// // mMap.getLayers().add(new LabelLayer(mMap,
|
||||||
// mMapLayer.getTileLayer()));
|
// // mMapLayer.getTileLayer()));
|
||||||
// mMap.getLayers().add(new JeoMapLayer(mMap));
|
// // mMap.getLayers().add(new JeoMapLayer(mMap));
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user