Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query didn't return result #77

Open
Alkalouti opened this issue Mar 15, 2017 · 0 comments
Open

Query didn't return result #77

Alkalouti opened this issue Mar 15, 2017 · 0 comments

Comments

@Alkalouti
Copy link

Alkalouti commented Mar 15, 2017

I have a list of stores as below:

"store" : {
    "2" : {
      "address" : "amman",
      "ctime" : "17:05:00",
      "g" : "9q8yyxfgs8",
      "id" : "11",
      "l" : [ 31.9453666, 35.9283716 ],
      "name" : "Kaluti",
      "otime" : "00:00:00",
      "phone" : "0795080034",
      "userId" : "4"
    },
    "7" : {
      "address" : "amman",
      "ctime" : "01:00:00",
      "g" : "9q8yyxfgs8",
      "id" : "7",
      "l" : [ 31.9453666, 35.9283716 ],
      "name" : "Zalloum33",
      "otime" : "05:00:00",
      "phone" : "0795080034",
      "userId" : "2"
    },
    "11" : {
      "address" : "amman",
      "ctime" : "17:05:00",
      "g" : "9q8yyxfgs8",
      "id" : "11",
      "l" : [ 31.9453666, 35.9283716 ],
      "name" : "Kaluti",
      "otime" : "00:00:00",
      "phone" : "0795080034",
      "userId" : "4"
    },
    "12" : {
      "address" : "asd",
      "ctime" : "22:00:00",
      "g" : "9q8yyxfgs8",
      "id" : "12",
      "l" : [ 37.7922, -122.4056973 ],
      "name" : "Amam",
      "otime" : "10:00:00",
      "phone" : "0795126776",
      "userId" : "4"
    },
    "19" : {
      ".priority" : "9q8yyxfgs8",
      "g" : "9q8yyxfgs8",
      "id" : "10",
      "l" : [ 37.7922, -122.4056973 ],
      "name" : "ahmad"
    }
  }

when I try to fetch this location with this code the query didn't return any value

let center = CLLocation(latitude: 31.97375, longitude: 35.872316)


        if let circleQuery = geoFire?.query(at: center, withRadius: 1.0) {
            _ = circleQuery.observe(.keyEntered) { (key, location) in
                print("Key '\(key)' entered the search area and is at location '\(location)'")
            }
            
            circleQuery.observeReady{
                print("All initial data has been loaded and events have been fired for circle query!")
            }
        }

but if I try to use the same code and just change the CLLocation with
let center = CLLocation(latitude: 37.7832889, longitude: -122.4056973)
it's return data.

please advice me where's the problem??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant