Maps.Subgurim.Net

Usuario anónimo  |  Ingresar  |  Regístrate

DragZoomControl

El DragZoomControl forma parte del GMaps Utility Library.

Usando el DragZoomControl podremos recuadrar una zona específica del mapa sobre la que se hará un zoom.




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