定向图钉
我有一个使用 Bing Maps Silverlight 控件的 Windows Phone 7 应用程序。任何人都可以建议如何在地图上放置图钉来指示行进方向。
我目前使用红点来显示当前位置。
<maps:MapLayer x:Name="LocationLayer">
<maps:Pushpin Style="{StaticResource CurrentLocationPushpinStyle}"
Location="{Binding CurrentLocation}" />
</maps:MapLayer>
CurrentLocation 在位置更改事件时更新。
我想要实现的是指向行进方向的箭头(e.Position.Location.Course),它将随着行进方向的变化而不断更新。
I have a Windows Phone 7 app using Bing Maps Silverlight control. Can anyone suggest how to place a pushpin on the map indicating direction of travel.
I currently use a red dot to show the current location.
<maps:MapLayer x:Name="LocationLayer">
<maps:Pushpin Style="{StaticResource CurrentLocationPushpinStyle}"
Location="{Binding CurrentLocation}" />
</maps:MapLayer>
CurrentLocation is updated on position change event.
What I want to achieve is an arrowhead pointing in the direction of travel (e.Position.Location.Course) which will continuously update as direction of travel changes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您需要创建一个扩展
PushPin
的自定义控件。您可以使用 RotationTransform 根据当前和先前的方向“转动”箭头。显然,您必须跟踪以前的(不同的)位置才能执行此操作。
I think you'll need to create a custom control which extends
PushPin
.You could use a RotationTransform to "turn" your arrow based on the current and previous direction. You'll obviously have to track the previous (different) location to do this though.