Commit 25120cc6 authored by 放牛的园子's avatar 放牛的园子

修改Android版本首次初始化路径贴图贴不上的问题

parent 3d1c59fa
......@@ -77,6 +77,9 @@ class AMapPathPolyline(context: Context) : ReactViewGroup(context), AMapOverlay
}
override fun add(map: AMap) {
val resource1 = context.resources.getIdentifier( imageName, "drawable", context.packageName)
var drawable1 = BitmapDescriptorFactory.fromResource(resource1)
bitmapDescriptor = drawable1
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