A Control Used to Set the Scale on the Map

By Sasa Ivetic, GIS Software Developer, Winnipeg, Manitoba, Canada

Download the script.

Code Summary

The SetScale control is a custom control allowing the user to change the map scale. The control allows the user to either choose from one of the pre-set scales, or to choose the “Other” option and enter their own scale. The developer can easily change the pre-set scales to include scales that might be better suited to their map. Feel free to customize the control as necessary.

The control requires the MapBuddyId parameter to be set, which is the name of the map to change the scale on. If the parameter is not set, it defaults to “Map1.” Usage is kept relatively simple:
1 – Add the SetScale.ascx file to your project
2 – Register the control in your ASPX file:

3 – Insert the SetScale control into the ASPX File (< and > removed):
ss:SetScale id=”SetScaleControl” runat=”server” MapBuddyId=”Map1″

4 – Modify the scales in the SetScale.ascx file to better suit your map (if necessary).


3 Responses to A Control Used to Set the Scale on the Map

  1. Bob Riches says:

    As a newbie, it was very nice to have something work without having to spend days trying to figure out how to do. Thanks.

  2. Simon says:

    Actually im less able – having difficulty understanding steps 2 & 3.
    Im using 9.2 (.NET) and have copied the files to here:
    C:\Inetpub\wwwroot\Test\SetScale.ascx.cs & SetScale.ascx

    I have opened the default.aspx but am unsure on how to register the control/where to insert the setscale control line (step3).

    Please can you put me out my misery and point out the obvious please?

  3. Consultant says:

    You can look inhelp section of VS 2005 for registering user controls . Below is a reference to that and some other links.

    1. From MSDN :

    Other forums on how to acheive above :



%d bloggers like this: