Flutter Google Maps-根据行驶方向旋转标记 [英] Flutter Google Maps - Rotate marker according to the driving direction

查看:127
本文介绍了Flutter Google Maps-根据行驶方向旋转标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以共享Flutter google maps插件的文档/代码示例,在这里我可以根据行驶方向旋转标记(例如:汽车图标)。我看到可以通过旋转标记在本地库上实现。但是无法找到在Flutter中旋转标记的任何选择。

Can anyone share a documentation / code sample for Flutter google maps plugin where I can rotate the marker ( ex: a car icon ) according to the driving direction. I saw this can be achieved on native library by rotating the marker. But couldn't fjnd any option to rotate the marker in Flutter.

我想我们在旋转标记时需要考虑以下几点。

I guess we need to consider below points while rotating the marker. Please add your thoughts on this as well.

地图北向。
设备从罗盘旋转。

Map North Direction. Devices rotation from compass.

谢谢

推荐答案

https://pub.dev/packages/location 插件:

Marker(
旋转:currentLocation.heading

Marker( rotation: currentLocation.heading )

这篇关于Flutter Google Maps-根据行驶方向旋转标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆