|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJavaScriptObject
com.google.maps.gwt.client.MVCObject
com.google.maps.gwt.client.places.Autocomplete
public class Autocomplete
A service to provide Place predictions based on a user's text input.
It attaches to an input element of type
text
, and listens for text entry in that field. The list of predictions
is presented as a drop-down list, and is updated as text is entered.
THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
Nested Class Summary | |
---|---|
static interface |
Autocomplete.PlaceChangedHandler
This event is fired when a PlaceResult
is made available for a Place the user has selected. |
Constructor Summary | |
---|---|
protected |
Autocomplete()
Protected constructor avoids default public constructor. |
Method Summary | |
---|---|
void |
addPlaceChangedListener(Autocomplete.PlaceChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addPlaceChangedListenerOnce(Autocomplete.PlaceChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
clearInstanceListeners()
Removes all listeners for all events for the given instance. |
void |
clearPlaceChangedListeners()
Removes all listeners for the given event for the given instance. |
static Autocomplete |
create(InputElement inputField)
Creates a new instance of Autocomplete
that attaches to the specified input text field with the given options. |
static Autocomplete |
create(InputElement inputField,
AutocompleteOptions opts)
Creates a new instance of Autocomplete
that attaches to the specified input text field with the given options. |
LatLngBounds |
getBounds()
Returns the bounds to which predictions are biased. |
PlaceResult |
getPlace()
Returns the details of the Place selected by the user, or null
if no Place has been selected yet. |
void |
setBounds(LatLngBounds bounds)
Sets the preferred area within which to return Place results. |
void |
setTypes(JsArrayString types)
Sets the types of predictions to be returned. |
void |
triggerPlaceChanged(JavaScriptObject... varargs)
Triggers the given event. |
Methods inherited from class com.google.maps.gwt.client.MVCObject |
---|
bindTo, bindTo, bindTo, bindTo, changed, create, get, notify, set, setValues, setValues, unbind, unbindAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Autocomplete()
Method Detail |
---|
public static Autocomplete create(InputElement inputField, AutocompleteOptions opts)
Autocomplete
that attaches to the specified input text field with the given options.
public static Autocomplete create(InputElement inputField)
Autocomplete
that attaches to the specified input text field with the given options.
public final void addPlaceChangedListener(Autocomplete.PlaceChangedHandler handler)
public final void addPlaceChangedListenerOnce(Autocomplete.PlaceChangedHandler handler)
public final void clearInstanceListeners()
public final void clearPlaceChangedListeners()
public final LatLngBounds getBounds()
public final PlaceResult getPlace()
null
if no Place has been selected yet.
public final void setBounds(LatLngBounds bounds)
public final void setTypes(JsArrayString types)
establishment
' for businesses and '
geocode
' for addresses. If no type is specified, both types will be returned.
public final void triggerPlaceChanged(JavaScriptObject... varargs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |