/// <summary> /// Adds a filter so that results can only be (roughly) within the specified /// geographic rectangle. /// </summary> /// <param name="rect">The rectangle within which to bound the results.</param> /// <returns>this Query.</returns> public Query WithIn(Rectangle rect) { AddFilter(rect); return this; }
public void QueryWithRectangleFilter() { var filter = new Rectangle(47.622525, -122.353599, 47.618244, -122.340339); String result = Factual.Query("t/places", filter); dynamic json = JsonConvert.DeserializeObject(result); Assert.AreEqual("ok", (string)json.status); Assert.IsTrue(result.Contains("Space Needle")); }