0

我正在尝试将事件处理程序附加到我的图钉。任何人都可以帮忙吗?这是我到目前为止所拥有的:

' 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)

此外,如果我拖动地图,图钉会停留在原位,而不是随地图移动。如何让它随地图移动?

谢谢

4

1 回答 1

0

您可以通过注册LeftMouseButtonUp事件来检测引脚何时被点击。这工作得足够接近,因为对检测抽头没有明显的区别。

位置是相对于主机控件的。
您需要将 Location 设置为 aGeoCoordinate以使图钉随地图移动。

于 2012-03-01T15:39:10.310 回答