PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Geocoding/Artem.GoogleGeocoding/GeoJsonData.cs

#
C# | 78 lines | 40 code | 12 blank | 26 comment | 0 complexity | 43ac7bbe87dd085807c9c85989b1ab49 MD5 | raw file
Possible License(s): MIT
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Artem.Google.Net {
  6. /// <summary>
  7. ///
  8. /// </summary>
  9. public class JsonGeoData {
  10. #region Properties ///////////////////////////////////////////////////////////////////////
  11. /// <summary>
  12. /// Gets or sets the status.
  13. /// </summary>
  14. /// <value>The status.</value>
  15. public GeoStatus status { get; set; }
  16. /// <summary>
  17. /// Gets or sets the results.
  18. /// </summary>
  19. /// <value>The results.</value>
  20. public JsonResult[] results { get; set; }
  21. #endregion
  22. #region Nested Types //////////////////////////////////////////////////////////////////////
  23. /// <summary>
  24. ///
  25. /// </summary>
  26. public class JsonAddress {
  27. public string long_name { get; set; }
  28. public string short_name { get; set; }
  29. public string[] types { get; set; }
  30. }
  31. /// <summary>
  32. ///
  33. /// </summary>
  34. public class JsonBounds {
  35. public JsonLocation northeast;
  36. public JsonLocation southwest;
  37. }
  38. /// <summary>
  39. ///
  40. /// </summary>
  41. public class JsonGeometry {
  42. public JsonBounds bounds { get; set; }
  43. public JsonLocation location { get; set; }
  44. public GeoLocationType location_type { get; set; }
  45. public JsonBounds viewport { get; set; }
  46. }
  47. /// <summary>
  48. ///
  49. /// </summary>
  50. public class JsonLocation {
  51. public double lat;
  52. public double lng;
  53. }
  54. /// <summary>
  55. ///
  56. /// </summary>
  57. public class JsonResult {
  58. public JsonAddress[] address_components { get; set; }
  59. public string formatted_address { get; set; }
  60. public JsonGeometry geometry { get; set; }
  61. public string partial_match { get; set; }
  62. public string[] types { get; set; }
  63. }
  64. #endregion
  65. }
  66. }