Created
March 24, 2014 15:22
-
-
Save muhammadghazali/9742313 to your computer and use it in GitHub Desktop.
Muhammad Ghazali's Online Notes: Gunakan native method untuk melakukan custom query di sails-mongo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Station.native(function(err, collection) { | |
collection.find({ | |
location: { | |
$near: { | |
$geometry: { | |
type: "Point", | |
// coordinates: [longitude, latitude] | |
coordinates: [50, 50] | |
} | |
}, | |
$maxDistance: 10000 | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment