com.google.gwt.maps.client.control
Class HierarchicalMapTypeControl

java.lang.Object
  extended by com.google.gwt.maps.client.control.Control
      extended by com.google.gwt.maps.client.control.HierarchicalMapTypeControl

public final class HierarchicalMapTypeControl
extends Control

Creates a control with buttons to pan in four directions, and zoom in and zoom out, and a zoom slider.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.maps.client.control.Control
Control.CustomControl
 
Field Summary
 
Fields inherited from class com.google.gwt.maps.client.control.Control
jsoPeer
 
Constructor Summary
HierarchicalMapTypeControl()
          Constructs the control.
 
Method Summary
 void addRelationship(MapType parentType, MapType childType)
          Registers a parent/child relationship between map types with the control.
 void addRelationship(MapType parentType, MapType childType, java.lang.String childText)
          Registers a parent/child relationship between map types with the control.
 void addRelationship(MapType parentType, MapType childType, java.lang.String childText, boolean isDefault)
          Registers a parent/child relationship between map types with the control.
 void clearRelationships()
          Removes all relationships from the control.
 void removeRelationship(MapType mapType)
          Removes all relationships involving a map type from the control.
 
Methods inherited from class com.google.gwt.maps.client.control.Control
createPeer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalMapTypeControl

public HierarchicalMapTypeControl()
Constructs the control. By default, the G_HYBRID_MAP map type is made a child of the MapType.getSatelliteMap() map type. If this is not desired, the relationship can be removed by calling the clearRelationships() method.

Method Detail

addRelationship

public void addRelationship(MapType parentType,
                            MapType childType)
Registers a parent/child relationship between map types with the control. Note that all relationships must be set up before the control is added. (Adding relationships after the control is added will have no effect.)

Parameters:
parentType - the parent MapType in the menu
childType - the child MapType to add to the menu.

addRelationship

public void addRelationship(MapType parentType,
                            MapType childType,
                            java.lang.String childText)
Registers a parent/child relationship between map types with the control. Note that all relationships must be set up before the control is added. (Adding relationships after the control is added will have no effect.)

Parameters:
parentType - the parent MapType in the menu
childType - the child MapType to add to the menu.
childText - will be displayed next to the checkbox for the child map type instead of its name

addRelationship

public void addRelationship(MapType parentType,
                            MapType childType,
                            java.lang.String childText,
                            boolean isDefault)
Registers a parent/child relationship between map types with the control. Note that all relationships must be set up before the control is added. (Adding relationships after the control is added will have no effect.)

Parameters:
parentType - the parent MapType in the menu
childType - the child MapType to add to the menu.
childText - the text to display in the menu (instead of the default)
isDefault - Set to true to make this map type the default selection when the map is loaded.

clearRelationships

public void clearRelationships()
Removes all relationships from the control.


removeRelationship

public void removeRelationship(MapType mapType)
Removes all relationships involving a map type from the control.