public class WildGeo extends Object
限定符和类型 | 类和说明 |
---|---|
static interface |
WildGeo.CompletionListener
A listener that can be used to be notified about a successful write or an error on writing.
|
构造器和说明 |
---|
WildGeo(com.wilddog.client.Wilddog wilddog)
Creates a new WildGeo instance at the given Wilddog reference.
|
限定符和类型 | 方法和说明 |
---|---|
void |
getLocation(String key,
LocationCallback callback)
Gets the current location for a key and calls the callback with the current value.
|
com.wilddog.client.Wilddog |
getWilddog() |
GeoQuery |
queryAtLocation(GeoLocation center,
double radius)
Returns a new Query object centered at the given location and with the given radius.
|
void |
removeLocation(String key)
Removes the location for a key from this WildGeo.
|
void |
removeLocation(String key,
WildGeo.CompletionListener completionListener)
Removes the location for a key from this WildGeo.
|
void |
setLocation(String key,
GeoLocation location)
Sets the location for a given key.
|
void |
setLocation(String key,
GeoLocation location,
WildGeo.CompletionListener completionListener)
Sets the location for a given key.
|
public WildGeo(com.wilddog.client.Wilddog wilddog)
wilddog
- The Wilddog reference this WildGeo instance usespublic com.wilddog.client.Wilddog getWilddog()
public void setLocation(String key, GeoLocation location)
key
- The key to save the location forlocation
- The location of this keypublic void setLocation(String key, GeoLocation location, WildGeo.CompletionListener completionListener)
key
- The key to save the location forlocation
- The location of this keycompletionListener
- A listener that is called once the location was successfully saved on the server or an
error occurredpublic void removeLocation(String key)
key
- The key to remove from this WildGeopublic void removeLocation(String key, WildGeo.CompletionListener completionListener)
key
- The key to remove from this WildGeocompletionListener
- A completion listener that is called once the location is successfully removed
from the server or an error occurredpublic void getLocation(String key, LocationCallback callback)
key
- The key whose location to getcallback
- The callback that is called once the location is retrievedpublic GeoQuery queryAtLocation(GeoLocation center, double radius)
center
- The center of the queryradius
- The radius of the query, in kilometersCopyright © 2015 Wilddog. All rights reserved.