android - 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
)
解决方案
推荐阅读
- html - 使用 sortable() 时无法对框进行排序
- python - 在python中,如何在不替换特定列的情况下生成随机抽样?
- arrays - 在映射函数之后遍历数组中的每个属性,然后返回新数组
- backend - 当后端服务器之一关闭时,haproxy 能否确保对后端服务器的每次调用都成功?
- tensorflow - ValueError: GRU(reset_after=False) 与 GRU(reset_after=True) 不兼容
- java - Azure Active Directory LDAP 密码更改
- nuxt.js - nuxt js 从服务器端访问组件数据
- gremlin - Tinkerpop 选择多个按顶点分组的邻居,它们是具有范围步长的邻居
- node.js - 授予节点 js 中 google drive api v3 上现有文件的权限
- apache-spark - 当行展平逻辑中存在错误/异常时,使用 Flatmap 函数跳过 Spark 数据集中的特定行