Ejemplo n.º 1
0
        public void AutoSuggestTest()
        {
            Console.WriteLine("Running Autosuggest Test");
            CoordWithRadius ul = new CoordWithRadius()
            {
                Latitude = 47.668697, Longitude = -122.376373, Radius = 5
            };

            var request = new AutosuggestRequest()
            {
                BingMapsKey = _ApiKey,
                Query       = "El Bur",
                UserLoc     = ul
            };

            Console.WriteLine(request.GetRequestUrl());
            var resources = GetResourcesFromRequest(request);
            var entities  = (resources[0] as AutosuggestResource);

            foreach (var entity in entities.Value)
            {
                Console.Write($"Entity of type {entity.Type} returned.");
            }

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public void AutoSuggestTest()
        {
            Console.WriteLine("Running Autosuggest Test");
            var ul = new CircularView(47.668697, -122.376373, 5);

            var request = new AutosuggestRequest()
            {
                BingMapsKey  = _ApiKey,
                Query        = "El Bur",
                UserLocation = ul,
            };

            Console.WriteLine(request.GetRequestUrl());
            var resources = GetResourcesFromRequest(request);
            var entities  = (resources[0] as Autosuggest);

            foreach (var entity in entities.Value)
            {
                Console.Write($"Entity of type {entity.Type} returned.");
            }

            Console.ReadLine();
        }