public void Encode()
        {
            var lineString = new LineString(new Coordinate(38.5, -120.2),
                                            new Coordinate(40.7, -120.95),
                                            new Coordinate(43.252, -126.453));

            var result = new GooglePolylineEncoder().Encode(lineString);

            Assert.AreEqual("_p~iF~ps|U_ulLnnqC_mqNvxq`@", result);
        }
        public IEnumerable<object> Get(string polyline)
        {
            var lineString = new GooglePolylineEncoder().Decode(polyline);

            using (var session = MvcApplication.DocumentStore.OpenSession())
            {
                return session.Query<Restaurant, RestaurantIndex>()
                    .Spatial(x => x.DriveThruArea, x => x.Within(lineString))
                    .TransformWith<RestaurantsTransformer, RestaurantResult>()
                    .Take(512)
                    .ToList();
            }
        }