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