@@ -23,18 +23,19 @@ public class Place implements Parcelable {
23
23
private final String longDescription ;
24
24
public final LatLng location ;
25
25
private final String category ;
26
+ public final String pic ;
26
27
27
28
public String distance ;
28
29
public final Sitelinks siteLinks ;
29
30
30
31
31
- public Place (String name , Label label , String longDescription , LatLng location , String category , Sitelinks siteLinks ) {
32
- this .name = name ;
32
+ public Place (String name , Label label , String longDescription , LatLng location , String category , Sitelinks siteLinks , String pic ) { this .name = name ;
33
33
this .label = label ;
34
34
this .longDescription = longDescription ;
35
35
this .location = location ;
36
36
this .category = category ;
37
37
this .siteLinks = siteLinks ;
38
+ this .pic = pic ;
38
39
}
39
40
40
41
public Place (Parcel in ) {
@@ -44,6 +45,7 @@ public Place(Parcel in) {
44
45
this .location = in .readParcelable (LatLng .class .getClassLoader ());
45
46
this .category = in .readString ();
46
47
this .siteLinks = in .readParcelable (Sitelinks .class .getClassLoader ());
48
+ this .pic = in .readString ();
47
49
}
48
50
49
51
public static Place from (NearbyResultItem item ) {
@@ -62,7 +64,7 @@ public static Place from(NearbyResultItem item) {
62
64
.setWikipediaLink (item .getWikipediaArticle ().getValue ())
63
65
.setCommonsLink (item .getCommonsArticle ().getValue ())
64
66
.setWikidataLink (item .getItem ().getValue ())
65
- .build ());
67
+ .build (), item . getPic (). getValue () );
66
68
}
67
69
68
70
/**
@@ -173,6 +175,7 @@ public String toString() {
173
175
", category='" + category + '\'' +
174
176
", distance='" + distance + '\'' +
175
177
", siteLinks='" + siteLinks .toString () + '\'' +
178
+ ", pic='" + pic + '\'' +
176
179
'}' ;
177
180
}
178
181
0 commit comments