[6.5.0][overlay] 画线时,添加是否绘制箭头开关
This commit is contained in:
@@ -54,6 +54,8 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
|
||||
|
||||
val customTexture: Bitmap? = builder.customTexture
|
||||
|
||||
val isShowArrow: Boolean = builder.isShowArrow
|
||||
|
||||
fun builder(): Builder {
|
||||
return builder
|
||||
}
|
||||
@@ -96,6 +98,8 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
|
||||
|
||||
internal var customTexture: Bitmap? = null
|
||||
|
||||
internal var isShowArrow: Boolean = false
|
||||
|
||||
fun setId(id: String) = apply {
|
||||
this.id = id
|
||||
}
|
||||
@@ -168,6 +172,10 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
|
||||
this.customTexture = texture
|
||||
}
|
||||
|
||||
fun isShowArrow(show: Boolean) = apply {
|
||||
this.isShowArrow = show
|
||||
}
|
||||
|
||||
fun build(): Options {
|
||||
if (TextUtils.isEmpty(id)) {
|
||||
id = UUID.randomUUID().toString()
|
||||
|
||||
@@ -229,6 +229,16 @@ public class ObjectUtils {
|
||||
target.setIsBright(true);
|
||||
target.setBrightColor(options.getLightColor());
|
||||
target.setBrightSpeed(options.getLightSpeed());
|
||||
} else {
|
||||
target.setIsBright(false);
|
||||
}
|
||||
Bitmap bitmap = options.getCustomTexture();
|
||||
if (bitmap != null) {
|
||||
target.useTexture(true);
|
||||
target.customTexture(bitmap);
|
||||
}
|
||||
if (options.isShowArrow()) {
|
||||
target.setIsArrow(true);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user