Start a new topic

Get locations of multiple types using DLC

Hello, I created Google Places DLC using Kinvey console and now I try to get all places that have types "bank", "airport", "department_store" and some other. If I run query with one location type everything is working fine /appdata/appkey/restaurants/?query={"_geoloc" : { "$nearSphere" : [-71.05,42.35], "$maxDistance":"0.5" },"types":["bank"]} but when I tried to get locations of banks and airports for example I get empty result /appdata/appkey/restaurants/?query={"_geoloc" : { "$nearSphere" : [-71.05,42.35], "$maxDistance":"0.5" },"types":["airport","bank"]} I also tried the next query /appdata/appkey/restaurants/?query={"_geoloc" : { "$nearSphere" : [-71.05,42.35], "$maxDistance":"0.5" },"$in":{"types":["airport","bank"]}} but also without success. Do you know is it possible to get all banks and airports for example using Kinvey Google Places DLC? Maybe something wrong with my query? Thanks

Good morning username, I think that you would use in on the array, not on types. Can you give something like this a shot? /appdata/appkey/restaurants/?query={"_geoloc" : { "$nearSphere" : [-71.05,42.35], "$maxDistance":"0.5" },"types":{"$in":["airport","bank"]}}
Thank you Damien for your response. Unfortunately this query doesn't work. I still get empty array in results, even when I increased maxDistance parameter
Username: Can you please check a few things for me: Can you try excluding parts of the query 1 at a time to see if it works? Can you remove the geoloc and try it? Can you also check to see if type{"$in": ...} works independently of the rest of the query. If we figure out which piece of this isn't working properly we should be able to pin down why. Thanks,
Without _geoloc I've got response { "error": "MissingRequestParameter", "description": "A required parameter is missing from the request", "debug": "Missing _geoloc!" }
username: Did any of my other suggestions return anything but errors for you?
Login or Signup to post a comment