Example usage for com.google.gwt.maps.client MapType getMarsElevationMap

List of usage examples for com.google.gwt.maps.client MapType getMarsElevationMap

Introduction

In this page you can find the example usage for com.google.gwt.maps.client MapType getMarsElevationMap.

Prototype

public static MapType getMarsElevationMap() 

Source Link

Document

Returns a map type displays a shaded relief map of the surface of Mars.

Usage

From source file:com.google.gwt.maps.sample.hellomaps.client.CustomControlDemo.java

License:Apache License

/**
 * Provide access to the HierarchicalMapTypeControl singleton.
 * //from   ww w  .  ja  v  a 2  s  .  co  m
 * @return an instance of the control is created if necessary. 
 */
private static HierarchicalMapTypeControl getHierarchicalMapTypeControl() {
    if (hControl != null) {
        return hControl;
    }
    hControl = new HierarchicalMapTypeControl();
    hControl.addRelationship(MapType.getNormalMap(), MapType.getMarsVisibleMap(), "Mars visible");
    hControl.addRelationship(MapType.getNormalMap(), MapType.getMarsInfraredMap(), "Mars infrared");
    hControl.addRelationship(MapType.getNormalMap(), MapType.getMarsElevationMap(), "Mars elevation", true);
    return hControl;
}

From source file:com.google.gwt.maps.sample.hellomaps.client.CustomControlDemo.java

License:Apache License

public CustomControlDemo() {

    VerticalPanel vertPanel = new VerticalPanel();
    vertPanel.setStyleName("hm-panel");

    actionListBox = new ListBox();
    for (ControlDemos cd : ControlDemos.values()) {
        actionListBox.addItem(cd.valueOf());
    }/*from   w ww . jav a 2s. c o m*/

    actionListBox.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
            displayCustomControl();
        }
    });

    HorizontalPanel horizPanel = new HorizontalPanel();
    horizPanel.add(new Label("Choose Action:"));
    horizPanel.add(actionListBox);
    horizPanel.setSpacing(10);
    vertPanel.add(horizPanel);

    map = new MapWidget(LatLng.newInstance(37.441944, -122.141944), 13);
    map.setSize("500px", "300px");
    map.addMapType(MapType.getNormalMap());
    map.addMapType(MapType.getSatelliteMap());
    map.addMapType(MapType.getMarsVisibleMap());
    map.addMapType(MapType.getMarsElevationMap());
    map.addMapType(MapType.getMarsInfraredMap());
    vertPanel.add(map);

    new Timer() {
        public void run() {
            displayCustomControl();
        }
    }.schedule(250);

    initWidget(vertPanel);
}