Commit ecdb7e61 authored by 放牛的园子's avatar 放牛的园子

修改路径贴图初始化为空的问题

parent dba23b51
......@@ -83,6 +83,9 @@ class AMapPathPolyline(context: Context) : ReactViewGroup(context), AMapOverlay
}
override fun add(map: AMap) {
//初始化贴图为空处理
val drawable = context.resources.getIdentifier(imageName, "drawable", context.packageName)
bitmapDescriptor = BitmapDescriptorFactory.fromResource(drawable)
polyline = map.addPolyline(PolylineOptions()
.setCustomTexture(bitmapDescriptor)
//.setCustomTextureIndex(listOf(0, 1, 2))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment