com.mapitz.gwt.googleMaps.client
Class GControl

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.mapitz.gwt.googleMaps.client.GControl

public class GControl
extends com.google.gwt.core.client.JavaScriptObject

Interface and factory for contols to control the Map (Zoom, Scale, etc...). Controls are added to the map using the GMap2.addControl() method.
In contrast to overlays, which are positioned relative to the map, controls are positioned relative to the map view, i.e. they don't move when the map moves.

Author:
aglaforge

Method Summary
 GControlPosition getDefaultPosition()
          getDefaultPosition() GControlPosition Returns to the map the position in the map view at which the control appears by default.
static GControl GLargeMapControl()
          Creates a control with buttons to pan in four directions, and zoom in and zoom out, and a zoom slider.
static GControl GMapTypeControl()
          Creates a control with buttons to switch between map types.
static GControl GScaleControl()
          Creates a control that displays the map scale.
static GControl GSmallMapControl()
          Creates a control with buttons to pan in four directions, and zoom in and zoom out.
 GControl GSmallZoomControl()
          Creates a control with buttons to zoom in and zoom out.
 com.google.gwt.user.client.Element initialize(GMap2 map)
          initialize(map) Node Will be called by the map so the control can initialize itself.
 boolean printable()
          printable() Boolean Returns to the map if the control should be printable.
 boolean selectable()
          selectable() Boolean Returns to the map if the control contains selectable text.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

GLargeMapControl

public static GControl GLargeMapControl()
Creates a control with buttons to pan in four directions, and zoom in and zoom out, and a zoom slider.

Returns:

GMapTypeControl

public static GControl GMapTypeControl()
Creates a control with buttons to switch between map types.

Returns:

GScaleControl

public static GControl GScaleControl()
Creates a control that displays the map scale.

Returns:

GSmallMapControl

public static GControl GSmallMapControl()
Creates a control with buttons to pan in four directions, and zoom in and zoom out.

Returns:

GSmallZoomControl

public GControl GSmallZoomControl()
Creates a control with buttons to zoom in and zoom out.

Returns:

printable

public boolean printable()
printable() Boolean Returns to the map if the control should be printable.

Returns:

selectable

public boolean selectable()
selectable() Boolean Returns to the map if the control contains selectable text.

Returns:

initialize

public com.google.gwt.user.client.Element initialize(GMap2 map)
initialize(map) Node Will be called by the map so the control can initialize itself. The control will use the method GMap2.getContainer() to get hold of the DOM element that contains the map, and add itself to it. It returns the added element.

Returns:

getDefaultPosition

public GControlPosition getDefaultPosition()
getDefaultPosition() GControlPosition Returns to the map the position in the map view at which the control appears by default. This will be overridden by the second argument to GMap2.addControl().

Returns: