File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
src/Umbraco.Cms.Integrations.Search.Algolia/Models Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change
1
+ using Newtonsoft . Json ;
2
+
3
+ namespace Umbraco . Cms . Integrations . Search . Algolia . Models
4
+ {
5
+ public class GeolocProperties
6
+ {
7
+ [ JsonProperty ( "lat" ) ]
8
+ public double Latitude { get ; set ; }
9
+
10
+ [ JsonProperty ( "lng" ) ]
11
+ public double Longitude { get ; set ; }
12
+ }
13
+ }
Original file line number Diff line number Diff line change 1
- namespace Umbraco . Cms . Integrations . Search . Algolia . Models
1
+ using Newtonsoft . Json ;
2
+
3
+ namespace Umbraco . Cms . Integrations . Search . Algolia . Models
2
4
{
3
5
public class Record
4
6
{
5
7
public Record ( )
6
8
{
7
9
Data = new Dictionary < string , object > ( ) ;
10
+ Geoloc = new List < GeolocProperties > ( ) ;
8
11
}
9
12
10
13
public Record ( Record record )
@@ -22,6 +25,7 @@ public Record(Record record)
22
25
Path = record . Path ;
23
26
Url = record . Url ;
24
27
Data = record . Data ;
28
+ Geoloc = record . Geoloc ;
25
29
}
26
30
27
31
public string ObjectID { get ; set ; }
@@ -58,6 +62,9 @@ public Record(Record record)
58
62
59
63
public string Url { get ; set ; }
60
64
65
+ [ JsonProperty ( "_geoloc" ) ]
66
+ public List < GeolocProperties > Geoloc { get ; set ; }
67
+
61
68
public Dictionary < string , object > Data { get ; set ; }
62
69
}
63
70
}
You can’t perform that action at this time.
0 commit comments