File tree 2 files changed +17
-0
lines changed
app/src/main/java/fr/free/nrw/commons
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
package fr .free .nrw .commons .location ;
2
2
3
3
import android .location .Location ;
4
+ import android .net .Uri ;
4
5
import android .support .annotation .NonNull ;
5
6
6
7
public class LatLng {
@@ -129,4 +130,8 @@ public double getLongitude() {
129
130
public double getLatitude () {
130
131
return latitude ;
131
132
}
133
+
134
+ public Uri getGmmIntentUri () {
135
+ return Uri .parse ("geo:0,0?q=" + latitude + "," + longitude );
136
+ }
132
137
}
Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ public void setDistance(String distance) {
42
42
this .distance = distance ;
43
43
}
44
44
45
+ public boolean hasWikipediaLink () {
46
+ return !(siteLinks == null || Uri .EMPTY .equals (siteLinks .getWikipediaLink ()));
47
+ }
48
+
49
+ public boolean hasWikidataLink () {
50
+ return !(siteLinks == null || Uri .EMPTY .equals (siteLinks .getWikidataLink ()));
51
+ }
52
+
53
+ public boolean hasCommonsLink () {
54
+ return !(siteLinks == null || Uri .EMPTY .equals (siteLinks .getCommonsLink ()));
55
+ }
56
+
45
57
@ Override
46
58
public boolean equals (Object o ) {
47
59
if (o instanceof Place ) {
You can’t perform that action at this time.
0 commit comments