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

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

Introduction

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

Prototype

public static MapType getMarsVisibleMap() 

Source Link

Document

Returns a map type that displays photographs taken from orbit around Mars.

Usage

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

License:Apache License

/**
 * Provide access to the HierarchicalMapTypeControl singleton.
 * //from  w  w  w . j  ava 2s. com
 * @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());
    }//  w  w  w .  j a v a  2  s  .co 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);
}