4
我正在爲Bing地圖使用Silverlight sdk。我有我的地圖,我有我的PushPins都映射出來。現在我想禁止用戶縮小到目前爲止他們看到整個世界,並保持它僅限於美國。如果有像Map.MaxZoom這樣簡單但沒有的東西,那將會很好。任何幫助?在Silverlight中爲Bing地圖設置最小/最大縮放
我正在爲Bing地圖使用Silverlight sdk。我有我的地圖,我有我的PushPins都映射出來。現在我想禁止用戶縮小到目前爲止他們看到整個世界,並保持它僅限於美國。如果有像Map.MaxZoom這樣簡單但沒有的東西,那將會很好。任何幫助?在Silverlight中爲Bing地圖設置最小/最大縮放
public class MyMapMode : Microsoft.Maps.MapControl.Core.MercatorMode
{
public Range<double> MapZoomRange = new Range<double>(1.0, 10.0);
protected override Range<double> GetZoomRange(Location center)
{
return this.MapZoomRange;
}
}
你可以試試!
我做到了!它的作品非常漂亮! – JoeCool 2011-01-27 17:22:42