Created
October 3, 2016 21:47
-
-
Save ilyachenko/c0192241e9f6704c22c8e516b3af9365 to your computer and use it in GitHub Desktop.
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
// Поиск по близости | |
db.places.find({ | |
loc: { | |
$near: [100, 100], | |
$maxDistance: 10 | |
} | |
}) | |
// Поиск по полигону | |
b.places.find({ | |
loc: { | |
$geoWithin: { | |
$polygon: [[0, 0], [0, 1], [1, 1], [1, 0]] | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment