Example usage for com.google.gwt.maps.client Maps loadMapsApi

List of usage examples for com.google.gwt.maps.client Maps loadMapsApi

Introduction

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

Prototype

public static void loadMapsApi(String key, String version, boolean usingSensor, AjaxLoaderOptions settings,
        Runnable onLoad) 

Source Link

Document

Initializes the Maps API using the AjaxLoader.

Usage

From source file:org.sigmah.client.map.MapApiLoader.java

License:Open Source License

private static void startLoad() {
    loadInProgress = true;/*  w  w  w. ja v  a 2  s  .co  m*/
    waitingMonitors = new ArrayList<AsyncMonitor>();
    waitingCallbacks = new ArrayList<AsyncCallback>();

    AjaxLoader.AjaxLoaderOptions options = AjaxLoader.AjaxLoaderOptions.newInstance();
    options.setLanguage(LocaleInfo.getCurrentLocale().getLocaleName());

    Maps.loadMapsApi(getApiKey(), API_VERSION, USING_SENSOR, options, new Runnable() {
        @Override
        public void run() {
            onApiLoaded();
        }
    });
    startFailureTimer();
}

From source file:org.sigmah.client.ui.map.MapApiLoader.java

License:Open Source License

private static void startLoad() {
    loadInProgress = true;/*  w ww.  j a v  a2  s.  c  om*/
    waitingCallbacks = new ArrayList<AsyncCallback>();

    AjaxLoader.AjaxLoaderOptions options = AjaxLoader.AjaxLoaderOptions.newInstance();
    options.setLanguage(LocaleInfo.getCurrentLocale().getLocaleName());

    Maps.loadMapsApi(getApiKey(), API_VERSION, USING_SENSOR, options, new Runnable() {
        @Override
        public void run() {
            onApiLoaded();
        }
    });
    startFailureTimer();
}