I am using the Silverlight sdk for Bing Maps. I have my map, I have my PushPins all mapped out. Now I want to disable the开发者_如何学Python user from zooming out so far they see the whole world and keep it constricted to the just the US. It would be nice if there was something simple like Map.MaxZoom but there is not. Any help?
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;
}
}
you can try it!
精彩评论