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

Extra controls

The "extra controls" are those made specfically for this Control. They do not come as part of the GoogleMaps API.
In some cases Google provides similar items. As such, these extras will likely go away in future versions of googlemaps.subgurim.net
For the extra controls, initialize the GControl with an element of the enumerator GControl.extraBuilt (see how in the code example). Until the present version we were using these types of extraBuilt controls:
  • TextualZoomControl: Adds two text boxes that control zoom in and out.
  • NumericalZoomControl: Adds two text boxes that control zoom in and out using the number of the zoom as the text.
  • TextualCoordinatesControl: Adds a text box with the coordinates of the central point of the map. It is updated as the map crawls. When the box is clicked, the window shows the exact coordinates where we are.
  • TextualOnClickCoordinatesControl: Adds a text box with the coordinates of the point last clicked-on in the map. When the box itself is clicked, a window shows the exact coordinates where we are.
  • MarkCenter: It adds one "+" marking the exact center of the map.




Code.aspx
<cc1:GMap ID="GMap1" runat="server" />
Code.aspx.cs
GControl control = new GControl(GControl.extraBuilt.NumericalZoomControl);
GMap1.addControl(control);

GMap1.addControl(new GControl(GControl.extraBuilt.TextualCoordinatesControl, new GControlPosition(GControlPosition.position.Top_Right)));
GMap1.addControl(new GControl(GControl.extraBuilt.TextualOnClickCoordinatesControl, new GControlPosition(GControlPosition.position.Bottom_Right)));
GMap1.addControl(new GControl(GControl.extraBuilt.MarkCenter));
Powered by Subgurim.NET