【发布时间】: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?
干杯
史蒂夫
【问题讨论】: