PageRenderTime 92ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 47ms app.codeStats 0ms

/Geocoding/Artem.GoogleGeocoding/GeoJsonData.cs

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