Ajax Map Zoom

Sep 30, 2015 at 10:54 AM

Could you please let me know how I can control the amount of zoom in Ajax Map control when we do a scroll in/out operation.

Oct 7, 2015 at 1:23 PM
Sorry, without tweaking the code you currently can't set that:

In the SharpMap.Web.UI.Ajax.AjaxMapControl you need to change the following line in GenerateClientScripts (somewhere around 374):
obj + ".zoomAmount = 3.0;" + newline +`
It would be ideal to change that to a property of the control
obj + ".zoomAmount = " + _ZoomAmout.ToString(numberFormat_EnUS) + ";" + newline +`
And have that property declared like
private double _ZoomAmount = 3.0;

/// <summary>
/// Gets or sets a value indicating the zoom factor by which to zoom in or out.
/// The default value is 3.0
/// </summary>
[Description("Sets the zoom factor by which to zoom in or out.")]
public double ZoomAmount
    get { return _ZoomAmout; }
    set { _ZoomAmout= value; }
Oct 12, 2015 at 4:08 PM
Thanks FObermaier,

I kind of figured this out but the above solutions helps me solve the problem better.