Anonymous user  |  Log in  |  Create Account

DragZoomControl

The DragZoomControl is part of the GMaps Utility Library.

We can select the specific zone in which the zoom will be applied using the DragZoomControl.




Code.aspx
<cc1:GMap ID="GMap1" runat="server" />
Code.aspx.cs
DragZoomControl dragZoomControl = new DragZoomControl();

DragZoomOtherOptions dragZoomOtherOptions = new DragZoomOtherOptions();
dragZoomOtherOptions.backButtonEnabled = true;
dragZoomOtherOptions.backButtonHTML = "Go back";
dragZoomOtherOptions.buttonHTML = "Zoom";
dragZoomOtherOptions.minDragSize = 5;
dragZoomControl.dragZoomOtherOptions = dragZoomOtherOptions;
dragZoomControl.dragZoomOtherOptions = dragZoomOtherOptions;

DragZoomCallbacks dragZoomCallbacks = new DragZoomCallbacks();
dragZoomCallbacks.buttonclick = "function(){alert('Button Click')}";
dragZoomControl.dragZoomCallbacks = dragZoomCallbacks;

DragZoomBoxStyleOptions dragZoomBoxStyleOptions = new DragZoomBoxStyleOptions();
dragZoomBoxStyleOptions.opacity = 0.5;
dragZoomBoxStyleOptions.fillColor = Color.Red;
dragZoomControl.dragZoomBoxStyleOptions = dragZoomBoxStyleOptions;

GControl dragzoom = new GControl(dragZoomControl, new GControlPosition(GControlPosition.position.Top_Left));

GMap1.Add(dragzoom);
Powered by Subgurim.NET