Samples improvements #32

This commit is contained in:
Emux
2017-03-07 10:46:10 +02:00
parent f6c28dc158
commit c1eca04ab1
15 changed files with 23 additions and 49 deletions

View File

@@ -19,7 +19,6 @@ import org.oscim.backend.CanvasAdapter;
import org.oscim.backend.canvas.Bitmap;
import org.oscim.core.GeoPoint;
import org.oscim.gdx.GdxMapApp;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.marker.ItemizedLayer;
import org.oscim.layers.marker.MarkerItem;
import org.oscim.layers.marker.MarkerSymbol;
@@ -87,8 +86,6 @@ public class AtlasMarkerLayerTest extends MarkerLayerTest {
pts.add(new MarkerItem(lat + "/" + lon, "", new GeoPoint(lat, lon)));
}
mMarkerLayer.addItems(pts);
mMap.layers().add(new TileGridLayer(mMap));
}
public static void main(String[] args) {

View File

@@ -22,7 +22,6 @@ import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint;
import org.oscim.core.GeoPoint;
import org.oscim.gdx.GdxMapApp;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.marker.ItemizedLayer;
import org.oscim.layers.marker.MarkerItem;
import org.oscim.layers.marker.MarkerSymbol;
@@ -91,8 +90,6 @@ public class AtlasMultiTextureTest extends MarkerLayerTest {
mMarkerLayer.addItems(pts);
mMap.layers().add(new TileGridLayer(mMap));
// set all markers
for (MarkerItem item : pts) {
MarkerSymbol markerSymbol = new MarkerSymbol(regionsMap.get(item.getTitle()), HotspotPlace.BOTTOM_CENTER);

View File

@@ -20,7 +20,6 @@ import org.oscim.backend.canvas.Bitmap;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeoPoint;
import org.oscim.gdx.GdxMapApp;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.marker.ClusterMarkerRenderer;
import org.oscim.layers.marker.ItemizedLayer;
import org.oscim.layers.marker.MarkerItem;
@@ -78,8 +77,6 @@ public class ClusterMarkerLayerTest extends MarkerLayerTest {
}
}
mMarkerLayer.addItems(pts);
mMap.layers().add(new TileGridLayer(mMap));
}
public static void main(String[] args) {

View File

@@ -22,7 +22,6 @@ import org.oscim.event.GestureListener;
import org.oscim.event.MotionEvent;
import org.oscim.gdx.GdxMapApp;
import org.oscim.layers.Layer;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.marker.ItemizedLayer;
import org.oscim.layers.marker.MarkerItem;
import org.oscim.layers.marker.MarkerSymbol;
@@ -78,8 +77,6 @@ public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGe
pts.add(new MarkerItem(lat + "/" + lon, "", new GeoPoint(lat, lon)));
}
mMarkerLayer.addItems(pts);
mMap.layers().add(new TileGridLayer(mMap));
}
@Override

View File

@@ -18,7 +18,6 @@ package org.oscim.test;
import org.oscim.backend.canvas.Color;
import org.oscim.gdx.GdxMapApp;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -90,7 +89,6 @@ public class VectorLayerTest extends GdxMapApp {
vectorLayer.update();
mMap.layers().add(vectorLayer);
mMap.layers().add(new TileGridLayer(mMap, 0xff222222, 1.2f, 1));
}
public static void main(String[] args) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -22,7 +22,6 @@ 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;
@@ -35,14 +34,13 @@ import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
public class LayerTest extends GdxMap {
String PATH = "https://gist.github.com/anonymous/8960337/raw/overpass.geojson";
private String PATH = "https://gist.github.com/anonymous/8960337/raw/overpass.geojson";
OSMIndoorLayer mIndoorLayer;
private OSMIndoorLayer mIndoorLayer;
@Override
public void createLayers() {
mMap.setBaseMap(new BitmapTileLayer(mMap, STAMEN_TONER.build()));
mMap.layers().add(new TileGridLayer(mMap));
mMap.addTask(new Runnable() {
@Override

View File

@@ -1,7 +1,22 @@
/*
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
* 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.jeo;
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;
@@ -28,7 +43,5 @@ public class ThemeTest extends GdxMapApp {
// mMap.getLayers().add(new LabelLayer(mMap,
// mMapLayer.getTileLayer()));
// mMap.getLayers().add(new JeoMapLayer(mMap));
mMap.layers().add(new TileGridLayer(mMap));
}
}