如何将事件处理程序附加到Bing地图推送引脚

时间:2011-12-07 23:37:13

标签: .net vb.net silverlight bing-maps pushpin

我正在尝试将事件处理程序附加到我的push pin。有人可以帮忙吗?这是我到目前为止所做的:

' Retrieve the center of the current map view.
Dim mapCenter = Map1.Center

' Create a pushpin to put at the center of the view.
Dim pin1 As New Pushpin()
pin1.Background = New SolidColorBrush(Colors.Red)

pin1.Location = New Location(52.499634, -1.705241)

此外,如果我拖动地图,推针会停留在原位,而不是随地图一起移动。如何使其随地图移动?

由于

1 个答案:

答案 0 :(得分:0)

您可以通过注册LeftMouseButtonUp事件来检测引脚被点击的时间。这种方法足够接近,因为对检测水龙头没有任何明显的区别。

位置相对于主机控件 您需要将位置设置为GeoCoordinate,以便使用地图移动图钉。

相关问题