Example usage for com.google.gwt.maps.client GoogleBarOptions setShowOnLoad

List of usage examples for com.google.gwt.maps.client GoogleBarOptions setShowOnLoad

Introduction

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

Prototype

public final native GoogleBarOptions setShowOnLoad(boolean showOnLoad) ;

Source Link

Document

When set to true, displays the GoogleBar text search box (provided the control is enabled and the map is loaded).

Usage

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

License:Apache License

public GoogleBarDemo() {
    GoogleBarAdsOptions adsOptions = GoogleBarAdsOptions.newInstance();
    adsOptions.setAdSafe(AdSafeOption.ADSAFE_MEDIUM);
    GoogleBarOptions googleBarOptions = GoogleBarOptions.newInstance();
    googleBarOptions.setAdsOptions(adsOptions);
    googleBarOptions.setShowOnLoad(true);
    googleBarOptions.setStyle("new");
    MapOptions mapOptions = MapOptions.newInstance();
    mapOptions.setGoogleBarOptions(googleBarOptions);
    mapOptions.setSize(Size.newInstance(500, 600));
    // Dublin//  w  ww  .  j av a2s  .  c o  m
    map = new MapWidget(LatLng.newInstance(53.350705, -6.264095), 13, mapOptions);
    // map.setUIToDefault();
    map.setGoogleBarEnabled(true);

    initWidget(map);
}