【问题标题】:WP7 Zoom To Pushpins Using BindingWP7 使用绑定缩放到图钉
【发布时间】:2010-10-28 21:09:34
【问题描述】:

我有一个位置列表,用于在 Bing 地图上显示图钉。然后我缩放地图以显示图钉。这就是我在后面的代码中的做法:

        Location location1 = new Location { Latitude = -36.736108, Longitude = 174.688411 };
        Location location2 = new Location { Latitude = -36.738756, Longitude = 174.696007 };
        Location location3 = new Location { Latitude = -36.746012, Longitude = 174.693174 };

        List<GeoCoordinate> locList = new List<GeoCoordinate>
                                          {
                                              new GeoCoordinate(location1.Latitude, location1.Longitude),
                                              new GeoCoordinate(location2.Latitude, location2.Longitude),
                                              new GeoCoordinate(location3.Latitude, location3.Longitude)
                                          };

        AddPin(location1, "Job 1");
        AddPin(location2, "Job 2");
        AddPin(location3, "Job 3");

        BingMap.SetView(LocationRect.CreateLocationRect(locList));

我想使用绑定来执行此操作,以便可以移动到视图模型。

如何通过绑定进行 SetView?

干杯

史蒂夫

【问题讨论】:

    标签: windows-phone-7 bing-maps


    【解决方案1】:

    您不能使用绑定直接绑定地图控件的视口。看看这个question 和这个question(尤其是第二个)寻找潜在的解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-30
      • 2018-08-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多