Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ callback is passed the error and the location will be `nil`.

##### Swift
````swift
geoFire.getLocationForKey("firebase-hq", withCallback: { (location, error) in
geoFire.getLocationForKey("firebase-hq") { (location, error) in
if (error != nil) {
println("An error occurred getting the location for \"firebase-hq\": \(error.localizedDescription)")
} else if (location != nil) {
println("Location for \"firebase-hq\" is [\(location.coordinate.latitude), \(location.coordinate.longitude)]")
} else {
println("GeoFire does not contain a location for \"firebase-hq\"")
}
})
}
````

### Geo Queries
Expand Down Expand Up @@ -267,9 +267,9 @@ FIRDatabaseHandle queryHandle = [query observeEventType:GFEventTypeKeyEntered wi

##### Swift
````swift
var queryHandle = query.observeEventType(.KeyEntered, withBlock: { (key: String!, location: CLLocation!) in
var queryHandle = query.observeEventType(.KeyEntered) { (key: String!, location: CLLocation!) in
println("Key '\(key)' entered the search area and is at location '\(location)'")
})
}
````

To cancel one or all callbacks for a geo query, call
Expand All @@ -291,9 +291,9 @@ fully loaded. `GFQuery` offers a method to listen for these ready events:

##### Swift
````swift
query.observeReadyWithBlock({
query.observeReadyWithBlock {
println("All initial data has been loaded and events have been fired!")
})
}
````

Note that locations might change while initially loading the data and key moved and key
Expand Down