开发者

Setting a min/max zoom for Bing maps in Silverlight

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜