Skip to content
Open
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
14 changes: 10 additions & 4 deletions Geofirestore/Classes/Geofirestore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,11 @@ public class GFSQuery {
} else if let l = snapshot?.get("l") as? GeoPoint {
let location = l.locationValue()
updateLocationInfo(location, forKey: key)
} else{
//TODO: error??
}
//Handle if location is received as Geopoint e.g. from an Android client
else if let l = snapshot?.get("l") as? GeoPoint, let key = snapshot?.documentID {
let location = CLLocation(latitude: l.latitude, longitude: l.longitude)
updateLocationInfo(location, forKey: key)
}

}
Expand All @@ -339,8 +342,11 @@ public class GFSQuery {
} else if let l = snapshot?.get("l") as? GeoPoint {
let location = l.locationValue()
updateLocationInfo(location, forKey: key)
} else{
//TODO: error??
}
//Handle if location is received as Geopoint e.g. from an Android client
else if let l = snapshot?.get("l") as? GeoPoint, let key = snapshot?.documentID {
let location = CLLocation(latitude: l.latitude, longitude: l.longitude)
updateLocationInfo(location, forKey: key)
}

}
Expand Down