Skip to content

Commit 596337d

Browse files
committed
Disable vtm-jeo again as its dependencies do not work
1 parent 5cb9e21 commit 596337d

File tree

9 files changed

+283
-285
lines changed

9 files changed

+283
-285
lines changed

docs/Changelog.md

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
## New since 0.21.0
44

55
- `vtm-themes` change package [#1130](https://github.com/mapsforge/vtm/issues/1130)
6-
- Enable `vtm-jeo`
7-
- Disable `vtm-theme-comparator`
86
- Minor improvements and bug fixes
97
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.22.0)
108

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ include ':vtm-gdx-poi3d'
2929
include ':vtm-http'
3030
include ':vtm-ios'
3131
include ':vtm-ios-example'
32-
include ':vtm-jeo'
32+
//include ':vtm-jeo'
3333
include ':vtm-json'
3434
include ':vtm-jts'
3535
include ':vtm-models'

vtm-android-example/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
<activity
5151
android:name=".GdxPoi3DActivity"
5252
android:configChanges="keyboardHidden|orientation|screenSize" />
53-
<activity
53+
<!--<activity
5454
android:name=".JeoIndoorActivity"
55-
android:configChanges="keyboardHidden|orientation|screenSize" />
55+
android:configChanges="keyboardHidden|orientation|screenSize" />-->
5656
<activity
5757
android:name=".LineTexActivity"
5858
android:configChanges="keyboardHidden|orientation|screenSize" />

vtm-android-example/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies {
55
implementation project(':vtm-android-mvt')
66
implementation project(':vtm-extras')
77
implementation project(':vtm-http')
8-
implementation project(':vtm-jeo')
8+
//implementation project(':vtm-jeo')
99
implementation project(':vtm-json')
1010
implementation project(':vtm-jts')
1111
implementation project(':vtm-mvt')

vtm-android-example/src/org/oscim/android/test/JeoIndoorActivity.java

+168-168
Original file line numberDiff line numberDiff line change
@@ -15,171 +15,171 @@
1515
* You should have received a copy of the GNU Lesser General Public License along with
1616
* this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
package org.oscim.android.test;
19-
20-
import android.content.Context;
21-
import android.os.Bundle;
22-
import android.view.View;
23-
import android.widget.Toast;
24-
import android.widget.ToggleButton;
25-
import io.jeo.map.Style;
26-
import io.jeo.vector.VectorDataset;
27-
import org.oscim.backend.CanvasAdapter;
28-
import org.oscim.backend.canvas.Color;
29-
import org.oscim.layers.OSMIndoorLayer;
30-
import org.oscim.layers.tile.buildings.BuildingLayer;
31-
import org.oscim.layers.tile.vector.labeling.LabelLayer;
32-
import org.oscim.test.JeoTest;
33-
import org.oscim.theme.internal.VtmThemes;
34-
import org.oscim.theme.styles.TextStyle;
35-
import org.oscim.utils.IOUtils;
36-
import org.slf4j.Logger;
37-
import org.slf4j.LoggerFactory;
38-
39-
import java.io.IOException;
40-
import java.io.InputStream;
41-
import java.net.URL;
42-
import java.net.URLConnection;
43-
import java.util.Arrays;
44-
45-
public class JeoIndoorActivity extends BaseMapActivity {
46-
public static final Logger log = LoggerFactory.getLogger(JeoIndoorActivity.class);
47-
48-
// from http://overpass-turbo.eu/s/2vp
49-
String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
50-
51-
private OSMIndoorLayer mIndoorLayer;
52-
53-
public JeoIndoorActivity() {
54-
super(R.layout.jeo_indoor_map);
55-
}
56-
57-
@Override
58-
public void onCreate(Bundle savedInstanceState) {
59-
super.onCreate(savedInstanceState);
60-
61-
mMap.addTask(new Runnable() {
62-
@Override
63-
public void run() {
64-
showToast("load data");
65-
InputStream is = null;
66-
try {
67-
// File file = new File(Environment.getExternalStorageDirectory()
68-
// .getAbsolutePath(), "osmindoor.json");
69-
// is = new FileInputStream(file);
70-
71-
URL url = new URL(PATH);
72-
URLConnection conn = url.openConnection();
73-
is = conn.getInputStream();
74-
loadJson(is);
75-
} catch (IOException e) {
76-
e.printStackTrace();
77-
} finally {
78-
IOUtils.closeQuietly(is);
79-
}
80-
}
81-
});
82-
83-
mMap.setTheme(VtmThemes.DEFAULT);
84-
85-
mMap.layers().add(new BuildingLayer(mMap, mBaseLayer));
86-
mMap.layers().add(new LabelLayer(mMap, mBaseLayer));
87-
88-
// String file = Environment.getExternalStorageDirectory().getAbsolutePath();
89-
// VectorDataset data = (VectorDataset) JeoTest.getJsonData(file + "/states.json", true);
90-
// Style style = JeoTest.getStyle();
91-
// mMap.layers().add(new JeoVectorLayer(mMap, data, style));
92-
}
93-
94-
void loadJson(InputStream is) {
95-
showToast("got data");
96-
97-
VectorDataset data = JeoTest.readGeoJson(is);
98-
Style style = JeoTest.getStyle();
99-
TextStyle textStyle = TextStyle.builder()
100-
.isCaption(true)
101-
.fontSize(16 * CanvasAdapter.getScale()).color(Color.BLACK)
102-
.strokeWidth(2.2f * CanvasAdapter.getScale()).strokeColor(Color.WHITE)
103-
.build();
104-
mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
105-
mMap.layers().add(mIndoorLayer);
106-
107-
showToast("data ready");
108-
mMap.updateMap(true);
109-
110-
mIndoorLayer.activeLevels[0] = true;
111-
shift();
112-
}
113-
114-
public void showToast(final String text) {
115-
final Context ctx = this;
116-
runOnUiThread(new Runnable() {
117-
@Override
118-
public void run() {
119-
Toast toast = Toast.makeText(ctx, text, Toast.LENGTH_SHORT);
120-
toast.show();
121-
}
122-
});
123-
}
124-
125-
boolean mShift = true;
126-
127-
public void shift() {
128-
if (!mShift)
129-
return;
130-
131-
mMap.postDelayed(new Runnable() {
132-
133-
@Override
134-
public void run() {
135-
for (int i = 0; i < 10; i++) {
136-
if (mIndoorLayer.activeLevels[i]) {
137-
mIndoorLayer.activeLevels[i] = false;
138-
mIndoorLayer.activeLevels[(i + 1) % 9] = true;
139-
mIndoorLayer.update();
140-
break;
141-
}
142-
}
143-
shift();
144-
}
145-
}, 200);
146-
147-
}
148-
149-
public void onClick(View v) {
150-
mShift = false;
151-
152-
if (mIndoorLayer == null)
153-
return;
154-
155-
int i = 0;
156-
157-
if (v instanceof ToggleButton) {
158-
ToggleButton b = (ToggleButton) v;
159-
i = (b.getTextOn().charAt(0) - '0') + 1;
160-
}
161-
162-
if (i < 0 || i > 9)
163-
i = 0;
164-
165-
mIndoorLayer.activeLevels[i] ^= true;
166-
if (v instanceof ToggleButton)
167-
((ToggleButton) v).setChecked(mIndoorLayer.activeLevels[i]);
168-
log.debug(Arrays.toString(mIndoorLayer.activeLevels));
169-
mIndoorLayer.update();
170-
}
171-
172-
@Override
173-
protected void onStop() {
174-
super.onStop();
175-
}
176-
177-
@Override
178-
protected void onResume() {
179-
super.onResume();
180-
181-
/* ignore saved position */
182-
//mMap.setMapPosition(49.417, 8.673, 1 << 17);
183-
mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
184-
}
185-
}
18+
//package org.oscim.android.test;
19+
//
20+
//import android.content.Context;
21+
//import android.os.Bundle;
22+
//import android.view.View;
23+
//import android.widget.Toast;
24+
//import android.widget.ToggleButton;
25+
//import io.jeo.map.Style;
26+
//import io.jeo.vector.VectorDataset;
27+
//import org.oscim.backend.CanvasAdapter;
28+
//import org.oscim.backend.canvas.Color;
29+
//import org.oscim.layers.OSMIndoorLayer;
30+
//import org.oscim.layers.tile.buildings.BuildingLayer;
31+
//import org.oscim.layers.tile.vector.labeling.LabelLayer;
32+
//import org.oscim.test.JeoTest;
33+
//import org.oscim.theme.internal.VtmThemes;
34+
//import org.oscim.theme.styles.TextStyle;
35+
//import org.oscim.utils.IOUtils;
36+
//import org.slf4j.Logger;
37+
//import org.slf4j.LoggerFactory;
38+
//
39+
//import java.io.IOException;
40+
//import java.io.InputStream;
41+
//import java.net.URL;
42+
//import java.net.URLConnection;
43+
//import java.util.Arrays;
44+
//
45+
//public class JeoIndoorActivity extends BaseMapActivity {
46+
// public static final Logger log = LoggerFactory.getLogger(JeoIndoorActivity.class);
47+
//
48+
// // from http://overpass-turbo.eu/s/2vp
49+
// String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";
50+
//
51+
// private OSMIndoorLayer mIndoorLayer;
52+
//
53+
// public JeoIndoorActivity() {
54+
// super(R.layout.jeo_indoor_map);
55+
// }
56+
//
57+
// @Override
58+
// public void onCreate(Bundle savedInstanceState) {
59+
// super.onCreate(savedInstanceState);
60+
//
61+
// mMap.addTask(new Runnable() {
62+
// @Override
63+
// public void run() {
64+
// showToast("load data");
65+
// InputStream is = null;
66+
// try {
67+
// // File file = new File(Environment.getExternalStorageDirectory()
68+
// // .getAbsolutePath(), "osmindoor.json");
69+
// // is = new FileInputStream(file);
70+
//
71+
// URL url = new URL(PATH);
72+
// URLConnection conn = url.openConnection();
73+
// is = conn.getInputStream();
74+
// loadJson(is);
75+
// } catch (IOException e) {
76+
// e.printStackTrace();
77+
// } finally {
78+
// IOUtils.closeQuietly(is);
79+
// }
80+
// }
81+
// });
82+
//
83+
// mMap.setTheme(VtmThemes.DEFAULT);
84+
//
85+
// mMap.layers().add(new BuildingLayer(mMap, mBaseLayer));
86+
// mMap.layers().add(new LabelLayer(mMap, mBaseLayer));
87+
//
88+
// // String file = Environment.getExternalStorageDirectory().getAbsolutePath();
89+
// // VectorDataset data = (VectorDataset) JeoTest.getJsonData(file + "/states.json", true);
90+
// // Style style = JeoTest.getStyle();
91+
// // mMap.layers().add(new JeoVectorLayer(mMap, data, style));
92+
// }
93+
//
94+
// void loadJson(InputStream is) {
95+
// showToast("got data");
96+
//
97+
// VectorDataset data = JeoTest.readGeoJson(is);
98+
// Style style = JeoTest.getStyle();
99+
// TextStyle textStyle = TextStyle.builder()
100+
// .isCaption(true)
101+
// .fontSize(16 * CanvasAdapter.getScale()).color(Color.BLACK)
102+
// .strokeWidth(2.2f * CanvasAdapter.getScale()).strokeColor(Color.WHITE)
103+
// .build();
104+
// mIndoorLayer = new OSMIndoorLayer(mMap, data, style, textStyle);
105+
// mMap.layers().add(mIndoorLayer);
106+
//
107+
// showToast("data ready");
108+
// mMap.updateMap(true);
109+
//
110+
// mIndoorLayer.activeLevels[0] = true;
111+
// shift();
112+
// }
113+
//
114+
// public void showToast(final String text) {
115+
// final Context ctx = this;
116+
// runOnUiThread(new Runnable() {
117+
// @Override
118+
// public void run() {
119+
// Toast toast = Toast.makeText(ctx, text, Toast.LENGTH_SHORT);
120+
// toast.show();
121+
// }
122+
// });
123+
// }
124+
//
125+
// boolean mShift = true;
126+
//
127+
// public void shift() {
128+
// if (!mShift)
129+
// return;
130+
//
131+
// mMap.postDelayed(new Runnable() {
132+
//
133+
// @Override
134+
// public void run() {
135+
// for (int i = 0; i < 10; i++) {
136+
// if (mIndoorLayer.activeLevels[i]) {
137+
// mIndoorLayer.activeLevels[i] = false;
138+
// mIndoorLayer.activeLevels[(i + 1) % 9] = true;
139+
// mIndoorLayer.update();
140+
// break;
141+
// }
142+
// }
143+
// shift();
144+
// }
145+
// }, 200);
146+
//
147+
// }
148+
//
149+
// public void onClick(View v) {
150+
// mShift = false;
151+
//
152+
// if (mIndoorLayer == null)
153+
// return;
154+
//
155+
// int i = 0;
156+
//
157+
// if (v instanceof ToggleButton) {
158+
// ToggleButton b = (ToggleButton) v;
159+
// i = (b.getTextOn().charAt(0) - '0') + 1;
160+
// }
161+
//
162+
// if (i < 0 || i > 9)
163+
// i = 0;
164+
//
165+
// mIndoorLayer.activeLevels[i] ^= true;
166+
// if (v instanceof ToggleButton)
167+
// ((ToggleButton) v).setChecked(mIndoorLayer.activeLevels[i]);
168+
// log.debug(Arrays.toString(mIndoorLayer.activeLevels));
169+
// mIndoorLayer.update();
170+
// }
171+
//
172+
// @Override
173+
// protected void onStop() {
174+
// super.onStop();
175+
// }
176+
//
177+
// @Override
178+
// protected void onResume() {
179+
// super.onResume();
180+
//
181+
// /* ignore saved position */
182+
// //mMap.setMapPosition(49.417, 8.673, 1 << 17);
183+
// mMap.setMapPosition(53.5620092, 9.9866457, 1 << 16);
184+
// }
185+
//}

vtm-android-example/src/org/oscim/android/test/Samples.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected void onCreate(Bundle savedInstanceState) {
121121
linearLayout.addView(createLabel("Experiments"));
122122
linearLayout.addView(createButton(ReverseGeocodeActivity.class));
123123
linearLayout.addView(createButton(ThemeStylerActivity.class));
124-
linearLayout.addView(createButton(JeoIndoorActivity.class));
124+
//linearLayout.addView(createButton(JeoIndoorActivity.class));
125125
linearLayout.addView(createButton(GdxPoi3DActivity.class));
126126
linearLayout.addView(createButton(OverpassActivity.class));
127127
linearLayout.addView(createButton(DraggableMarkerOverlayActivity.class));

vtm-playground/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies {
88
implementation project(':vtm-extras')
99
implementation project(':vtm-gdx-poi3d')
1010
implementation project(':vtm-http')
11-
implementation project(':vtm-jeo')
11+
//implementation project(':vtm-jeo')
1212
implementation project(':vtm-json')
1313
implementation project(':vtm-jts')
1414
implementation project(':vtm-models')

0 commit comments

Comments
 (0)