OSMIndoorLayer: add style scaling #355
This commit is contained in:
@@ -94,7 +94,7 @@ public class JeoIndoorMapActivity extends BaseMapActivity {
|
|||||||
|
|
||||||
VectorDataset data = JeoTest.readGeoJson(is);
|
VectorDataset data = JeoTest.readGeoJson(is);
|
||||||
Style style = JeoTest.getStyle();
|
Style style = JeoTest.getStyle();
|
||||||
mIndoorLayer = new OSMIndoorLayer(mMap, data, style);
|
mIndoorLayer = new OSMIndoorLayer(mMap, data, style, getResources().getDisplayMetrics().density);
|
||||||
mMap.layers().add(mIndoorLayer);
|
mMap.layers().add(mIndoorLayer);
|
||||||
|
|
||||||
showToast("data ready");
|
showToast("data ready");
|
||||||
|
|||||||
@@ -43,13 +43,19 @@ import java.util.HashMap;
|
|||||||
public class OSMIndoorLayer extends JeoVectorLayer {
|
public class OSMIndoorLayer extends JeoVectorLayer {
|
||||||
|
|
||||||
protected TextBucket mTextLayer;
|
protected TextBucket mTextLayer;
|
||||||
protected TextStyle mText = TextStyle.builder()
|
protected TextStyle mText;
|
||||||
.fontSize(16).color(Color.BLACK)
|
|
||||||
.strokeWidth(2.2f).strokeColor(Color.WHITE)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
public OSMIndoorLayer(Map map, VectorDataset data, Style style) {
|
public OSMIndoorLayer(Map map, VectorDataset data, Style style) {
|
||||||
|
this(map, data, style, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OSMIndoorLayer(Map map, VectorDataset data, Style style, float scale) {
|
||||||
super(map, data, style);
|
super(map, data, style);
|
||||||
|
|
||||||
|
mText = TextStyle.builder()
|
||||||
|
.fontSize(16 * scale).color(Color.BLACK)
|
||||||
|
.strokeWidth(2.2f * scale).strokeColor(Color.WHITE)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean[] activeLevels = new boolean[10];
|
public boolean[] activeLevels = new boolean[10];
|
||||||
|
|||||||
Reference in New Issue
Block a user