com.google.gwt.maps.client
Class Maps

java.lang.Object
  extended by com.google.gwt.maps.client.Maps

public class Maps
extends java.lang.Object

A collection of static methods and API wide constants.


Method Summary
static void assertLoaded()
          Check for the availability of the maps API.
static java.lang.String getVersion()
          Return the Maps API Version currently loaded.
static boolean isBrowserCompatible()
          Returns true if the current browser supports the maps API library.
static boolean isLoaded()
          Check for the availability of the Maps API.
static boolean isRTL()
          Returns true if the application's UI layout is right-to-left in bidirectional languages such as Arabic or Hebrew.
static void loadMapsApi(java.lang.String key, java.lang.String version, boolean usingSensor, AjaxLoader.AjaxLoaderOptions settings, java.lang.Runnable onLoad)
          Initializes the Maps API using the AjaxLoader.
static void loadMapsApi(java.lang.String key, java.lang.String version, boolean usingSensor, java.lang.Runnable onLoad)
          Initializes the Maps API using the AjaxLoader.
static void logWrite(java.lang.String message)
          Writes the message as plain text into the log window.
static void logWrite(java.lang.String message, java.lang.String color)
          Writes the message as plain text into the log window.
static void logWriteHtml(java.lang.String html)
          Writes text as HTML in the log window.
static void logWriteUrl(java.lang.String url)
          Writes a link to the given URL into the log window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertLoaded

public static void assertLoaded()
Check for the availability of the maps API. If it is not loaded, throws a RuntimeException.


getVersion

public static java.lang.String getVersion()
Return the Maps API Version currently loaded.

Returns:
the Maps API Version currently loaded.

isBrowserCompatible

public static boolean isBrowserCompatible()
Returns true if the current browser supports the maps API library.

Returns:
true if the current browser supports the maps API library.

isLoaded

public static boolean isLoaded()
Check for the availability of the Maps API. This means that the Maps API script is loaded and has successfully initialized.

Returns:
true if the Maps API is loaded.

isRTL

public static boolean isRTL()
Returns true if the application's UI layout is right-to-left in bidirectional languages such as Arabic or Hebrew. Note: because bidirectional languages such as Arabic and Hebrew affect the layout of the GInfoWindow object, these languages are only selected if explicitly requested via an applicable hl parameter or through the addition of the allow_bidi=true parameter to the API bootstrap request. For more information about BCP 47, see the W3 documentation.

Returns:
true if the application's UI layout is right-to-left in bidirectional languages such as Arabic or Hebrew.

loadMapsApi

public static void loadMapsApi(java.lang.String key,
                               java.lang.String version,
                               boolean usingSensor,
                               AjaxLoader.AjaxLoaderOptions settings,
                               java.lang.Runnable onLoad)
Initializes the Maps API using the AjaxLoader. This is in lieu of specifying the <script> tag for maps.google.com in your hosted HTML page or project's GWT module specification.

Parameters:
key - Maps API key. See http://code.google.com/apis/maps/signup.html
version - The version of the maps API to load. For example, "2.x"
usingSensor - Use of the Google Maps API now requires that you indicate whether your application is using a sensor (such as a GPS locator) to determine the user's location. This is especially important for mobile devices.
settings - other AjaxLoader settings for the Maps API. This parameter must not be null.
onLoad - callback to be invoked when the library is loaded.
See Also:
"http://code.google.com/apis/maps/documentation/#AJAX_Loader"

loadMapsApi

public static void loadMapsApi(java.lang.String key,
                               java.lang.String version,
                               boolean usingSensor,
                               java.lang.Runnable onLoad)
Initializes the Maps API using the AjaxLoader. This is in lieu of specifying the <script> tag for maps.google.com in your hosted HTML page or project's GWT module specification.

Parameters:
key - Maps API key. See http://code.google.com/apis/maps/signup.html
version - The version of the maps API to load. For example, "2.x"
usingSensor - Use of the Google Maps API now requires that you indicate whether your application is using a sensor (such as a GPS locator) to determine the user's location. This is especially important for mobile devices.
onLoad - callback to be invoked when the library is loaded.
See Also:
"http://code.google.com/apis/maps/documentation/#AJAX_Loader"

logWrite

public static void logWrite(java.lang.String message)
Writes the message as plain text into the log window. HTML markup characters will be escaped so that they are visible as characters. characters will be escaped so that they are visible as characters.

Parameters:
message - the message to write to the log window.

logWrite

public static void logWrite(java.lang.String message,
                            java.lang.String color)
Writes the message as plain text into the log window. HTML markup characters will be escaped so that they are visible as characters.

Parameters:
message - the message to write to the log window.
color - CSS color specification for the text.

logWriteHtml

public static void logWriteHtml(java.lang.String html)
Writes text as HTML in the log window.

Parameters:
html - message to write into the log window.

logWriteUrl

public static void logWriteUrl(java.lang.String url)
Writes a link to the given URL into the log window.

Parameters:
url - URL to write into the log window.