Beispiel #1
0
        public List <Hydrant> GetHydrants(GeoBox _geoBox)
        {
            IMongoQuery query = Query.WithinRectangle("Position",
                                                      _geoBox.MinLongitude(), _geoBox.MinLatitude(),
                                                      _geoBox.MaxLongitude(), _geoBox.MaxLatitude());

            return(GetList(query));
        }
Beispiel #2
0
        public List <Hydrant> GetHydrants(GeoBox _geoBox, int _quantity)
        {
            IMongoQuery query = Query.WithinRectangle("Position",
                                                      _geoBox.MinLongitude(), _geoBox.MinLatitude(),
                                                      _geoBox.MaxLongitude(), _geoBox.MaxLatitude());

            MongoCursor cursor = GetCursor(query).SetLimit(_quantity);

            return(GetList(cursor));
        }