views:

195

answers:

1

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 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?

A: 
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!

nbjkj