/// <summary> /// Rapid Street Data Single /// </summary> public void RapidStreetDataSingle() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); GeocodingParameters geoParams = new GeocodingParameters() { Pk =4 }; // Run the query string errorString = ""; ArrayList result = route4Me.RapidStreetData(geoParams, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("RapidStreetDataSingle executed successfully"); foreach (Dictionary<string, string> res1 in result) { Console.WriteLine("Zipcode: " + res1["zipcode"]); Console.WriteLine("Street name: " + res1["street_name"]); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("RapidStreetDataSingle error: {0}", errorString); } }
/// <summary> /// Rapid Street Service Limited /// </summary> public void RapidStreetServiceLimited() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); GeocodingParameters geoParams = new GeocodingParameters() { Zipcode = "00601", Housenumber = "17", Offset = 1, Limit = 10 }; // Run the query string errorString = ""; ArrayList result = route4Me.RapidStreetService(geoParams, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("RapidStreetServiceLimited executed successfully"); foreach (Dictionary<string, string> res1 in result) { Console.WriteLine("Zipcode: " + res1["zipcode"]); Console.WriteLine("Street name: " + res1["street_name"]); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("RapidStreetServiceLimited error: {0}", errorString); } }
/// <summary> /// Forward Geocoding /// </summary> /// <returns> xml object </returns> public void GeocodingForward(GeocodingParameters geoParams) { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); //Run the query string errorString = ""; string result = route4Me.Geocoding(geoParams, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("GeocodingForward executed successfully"); } else { Console.WriteLine("GeocodingForward error: {0}", errorString); } }
/// <summary> /// Reverse Geocoding /// </summary> /// <returns> xml object </returns> public void ReverseGeocoding() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); GeocodingParameters geoParams = new GeocodingParameters { Addresses = "42.35863,-71.05670" }; // Run the query string errorString = ""; string result = route4Me.Geocoding(geoParams, out errorString); Console.WriteLine(""); if (result != null) { Console.WriteLine("ReverseGeocoding executed successfully"); } else { Console.WriteLine("ReverseGeocoding error: {0}", errorString); } }