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

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

Introduction

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

Prototype

public static List<MapType> getDefaultMapTypes() 

Source Link

Document

Returns G_DEFAULT_MAP_TYPES as an Java Array of MapType objects.

Usage

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

License:Apache License

public MapTypeDemo() {

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

    map = new MapWidget(LatLng.newInstance(37.4419, -122.1419), 13);
    map.setSize("500px", "500px");

    // Add in all the map types we know about.
    for (MapType mt : MapType.getDefaultMapTypes()) {
        map.addMapType(mt);/*from  w w  w  .  j a v a  2 s.co  m*/
    }
    map.addMapType(MapType.getPhysicalMap());
    map.addMapType(MapType.getEarthMap());

    for (MapType mt : MapType.getMoonMapTypes()) {
        map.addMapType(mt);
    }

    for (MapType mt : MapType.getMarsMapTypes()) {
        map.addMapType(mt);
    }

    for (MapType mt : MapType.getSkyMapTypes()) {
        map.addMapType(mt);
    }

    map.addControl(new DemoCustomMapTypeControl());
    map.addControl(new LargeMapControl());
    vertPanel.add(map);

    initWidget(vertPanel);
}