Kotlin/Android:自定义 googlemaps 标记的旋转

问题描述

标记将如何在 googlemaps 上旋转?使用精简模式。我已经尝试了很多。什么都行不通。这是我的调查基础,在我看来很正确:

val marker = map.addMarker(
        MarkerOptions()
            .position(arrowPointPosition)
            .icon(BitmapDescriptorFactory.fromBitmap(
                IconGenerator(context).run {
                    setBackground(resources.getDrawable(R.drawable.ic_arrow_head,null)) // also tried to wrap it into a layout
                    setRotation(33) // alternative A
                    makeIcon()
                }
            ))
            .anchor(0.5F,0.5F)
            .rotation(33F) // alternative B
    )

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)