Skip to content

Instantly share code, notes, and snippets.

@siddharthlatest
Last active January 8, 2016 08:55
Show Gist options
  • Save siddharthlatest/89ace6dbdc0667364b52 to your computer and use it in GitHub Desktop.
Save siddharthlatest/89ace6dbdc0667364b52 to your computer and use it in GitHub Desktop.
geolocation search query returned via data streams
this.getDragData = function(lat, lng) {
return appbaseRef.search({
type: 'city',
body: {
query: {
filter: {
geo_distance: {
distance: "2000km",
location: [lat, lng]
}
}
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment