forked from cafeasp/googleGeoCodingApi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GoogleGeoJsonResult
49 lines (38 loc) · 1.4 KB
/
GoogleGeoJsonResult
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace GeoCoding
{
public class GoogleGeoJsonResult
{
[JsonProperty("address_components", NullValueHandling = NullValueHandling.Ignore)]
public AddressComponents[] Acomponents { get; set; }
[JsonProperty("formatted_address", NullValueHandling = NullValueHandling.Ignore)]
public string FormattedAddress { get; set; }
[JsonProperty("geometry", NullValueHandling = NullValueHandling.Ignore)]
public Geometry Geometry { get; set; }
}
public class AddressComponents
{
public string LongName { get; set; }
public string ShortName { get; set; }
public string[] Types { get; set; }
}
public class Geometry
{
[JsonProperty("location_type", NullValueHandling = NullValueHandling.Ignore)]
public string LocationType { get; set; }
[JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)]
public Location Location { get; set; }
}
public class Location
{
[JsonProperty("lat", NullValueHandling = NullValueHandling.Ignore)]
public string Lat { get; set; }
[JsonProperty("lng", NullValueHandling = NullValueHandling.Ignore)]
public string Long { get; set; }
}
}