LocationTextureRenderer: add billboard rendering property (#549)
This commit is contained in:
parent
94a2461741
commit
0fefd20cc6
@ -70,6 +70,9 @@ public class LocationTextureActivity extends BitmapTileActivity implements Locat
|
|||||||
// set color of indicator circle (Color.RED is default)
|
// set color of indicator circle (Color.RED is default)
|
||||||
locationLayer.locationRenderer.setIndicatorColor(Color.MAGENTA);
|
locationLayer.locationRenderer.setIndicatorColor(Color.MAGENTA);
|
||||||
|
|
||||||
|
// set billboard rendering for TextureRegion (false is default)
|
||||||
|
locationLayer.locationRenderer.setBillboard(false);
|
||||||
|
|
||||||
locationLayer.setEnabled(false);
|
locationLayer.setEnabled(false);
|
||||||
mMap.layers().add(locationLayer);
|
mMap.layers().add(locationLayer);
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,7 @@ public class LocationTextureRenderer extends BucketRenderer {
|
|||||||
private TextureRegion textureRegion;
|
private TextureRegion textureRegion;
|
||||||
private int accuracyColor = Color.BLUE;
|
private int accuracyColor = Color.BLUE;
|
||||||
private int viewShedColor = Color.RED;
|
private int viewShedColor = Color.RED;
|
||||||
|
private boolean billboard = false;
|
||||||
|
|
||||||
public LocationTextureRenderer(Map map) {
|
public LocationTextureRenderer(Map map) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
@ -114,6 +115,10 @@ public class LocationTextureRenderer extends BucketRenderer {
|
|||||||
this.accuracyColor = color;
|
this.accuracyColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBillboard(boolean billboard) {
|
||||||
|
this.billboard = billboard;
|
||||||
|
}
|
||||||
|
|
||||||
public void setIndicatorColor(int color) {
|
public void setIndicatorColor(int color) {
|
||||||
this.viewShedColor = color;
|
this.viewShedColor = color;
|
||||||
}
|
}
|
||||||
@ -126,8 +131,13 @@ public class LocationTextureRenderer extends BucketRenderer {
|
|||||||
this.radius = radius;
|
this.radius = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTextureRegion(TextureRegion region) {
|
public void setTextureRegion(TextureRegion textureRegion) {
|
||||||
textureRegion = region;
|
this.textureRegion = textureRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTextureRegion(TextureRegion textureRegion, boolean billboard) {
|
||||||
|
this.textureRegion = textureRegion;
|
||||||
|
this.billboard = billboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animate(boolean enable) {
|
private void animate(boolean enable) {
|
||||||
@ -243,7 +253,7 @@ public class LocationTextureRenderer extends BucketRenderer {
|
|||||||
if (textureRegion == null)
|
if (textureRegion == null)
|
||||||
return;
|
return;
|
||||||
SymbolItem symbolItem = SymbolItem.pool.get();
|
SymbolItem symbolItem = SymbolItem.pool.get();
|
||||||
symbolItem.set(symbolX, symbolY, textureRegion, this.bearing, false);
|
symbolItem.set(symbolX, symbolY, textureRegion, this.bearing, this.billboard);
|
||||||
symbolItem.offset = CENTER_OFFSET;
|
symbolItem.offset = CENTER_OFFSET;
|
||||||
symbolBucket.pushSymbol(symbolItem);
|
symbolBucket.pushSymbol(symbolItem);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user