【问题标题】:Bing maps silverlight control custom pushpin必应地图 Silverlight 控制自定义图钉
【发布时间】:2011-01-26 07:17:52
【问题描述】:

我尝试为 Bing 地图 silverlight 控件制作自定义图钉,但我只能添加 1 个图钉。在第二个图钉上,我收到以下错误:

System.ArgumentException: Value does not fall within the expected range.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
   at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
   at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
   at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
   at System.Windows.PresentationFrameworkCollection`1.Add(T value)
   at MapInfo.Silverlight.CitiesControl.MainPage.c_GetCitiesCompleted(Object sender, GetCitiesCompletedEventArgs e)

有谁知道我可能做错了什么? 在将其添加到地图之前,我正在设置以下属性:

    public Location Location
    {
        get
        {
            return this.GetValue(MapLayer.PositionProperty) as Location;
        }
        set
        {
            this.SetValue(MapLayer.PositionProperty, value);
        }
    }
   this.SetValue(MapLayer.PositionOriginProperty, PositionOrigin.BottomLeft);

【问题讨论】:

    标签: c# bing-maps silverlight-3.0 pushpin


    【解决方案1】:

    2 个图钉不能具有相同的 Name 属性值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多