Help us translate this website and improve this translation and earn free licenses!
Anonymous user  |  Log in  |  Create Account

How to...

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";
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