public class GeoQuery extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addGeoQueryDataEventListener(GeoQueryDataEventListener listener)
Adds a new GeoQueryEventListener to this GeoQuery.
|
void |
addGeoQueryEventListener(GeoQueryEventListener listener)
Adds a new GeoQueryEventListener to this GeoQuery.
|
GeoLocation |
getCenter()
Returns the current center of this query.
|
double |
getRadius()
Returns the radius of the query, in kilometers.
|
void |
removeAllListeners()
Removes all event listeners from this GeoQuery.
|
void |
removeGeoQueryEventListener(GeoQueryDataEventListener listener)
Removes an event listener.
|
void |
removeGeoQueryEventListener(GeoQueryEventListener listener)
Removes an event listener.
|
void |
setCenter(GeoLocation center)
Sets the new center of this query and triggers new events if necessary.
|
void |
setLocation(GeoLocation center,
double radius)
Sets the center and radius (in kilometers) of this query, and triggers new events if necessary.
|
void |
setRadius(double radius)
Sets the radius of this query, in kilometers, and triggers new events if necessary.
|
public void addGeoQueryEventListener(GeoQueryEventListener listener)
listener - The listener to addIllegalArgumentException - If this listener was already addedpublic void addGeoQueryDataEventListener(GeoQueryDataEventListener listener)
listener - The listener to addIllegalArgumentException - If this listener was already addedpublic void removeGeoQueryEventListener(GeoQueryEventListener listener)
listener - The listener to removeIllegalArgumentException - If the listener was removed already or never addedpublic void removeGeoQueryEventListener(GeoQueryDataEventListener listener)
listener - The listener to removeIllegalArgumentException - If the listener was removed already or never addedpublic void removeAllListeners()
public GeoLocation getCenter()
public void setCenter(GeoLocation center)
center - The new centerpublic double getRadius()
public void setRadius(double radius)
radius - The radius of the query, in kilometers. The maximum radius that is
supported is about 8587km. If a radius bigger than this is passed we'll cap it.public void setLocation(GeoLocation center, double radius)
center - The new centerradius - The radius of the query, in kilometers. The maximum radius that is
supported is about 8587km. If a radius bigger than this is passed we'll cap it.Copyright © 2017 Firebase. All rights reserved.