diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/line/Polyline.kt b/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/line/Polyline.kt index a758519ade..dbd3e6e6fc 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/line/Polyline.kt +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/overlay/line/Polyline.kt @@ -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() diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java index 6d9b5a7013..d097af5849 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java @@ -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; }