public class GeoQuery
extends java.lang.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.
|
com.google.firebase.firestore.GeoPoint |
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(com.google.firebase.firestore.GeoPoint center)
Sets the new center of this query and triggers new events if necessary.
|
void |
setLocation(com.google.firebase.firestore.GeoPoint 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 addjava.lang.IllegalArgumentException
- If this listener was already addedpublic void addGeoQueryDataEventListener(GeoQueryDataEventListener listener)
listener
- The listener to addjava.lang.IllegalArgumentException
- If this listener was already addedpublic void removeGeoQueryEventListener(GeoQueryEventListener listener)
listener
- The listener to removejava.lang.IllegalArgumentException
- If the listener was removed already or never addedpublic void removeGeoQueryEventListener(GeoQueryDataEventListener listener)
listener
- The listener to removejava.lang.IllegalArgumentException
- If the listener was removed already or never addedpublic void removeAllListeners()
public com.google.firebase.firestore.GeoPoint getCenter()
public void setCenter(com.google.firebase.firestore.GeoPoint 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(com.google.firebase.firestore.GeoPoint 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.