mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Minor formatting changes
This commit is contained in:
parent
0edbf2f356
commit
a21a923243
2 changed files with 7 additions and 7 deletions
|
|
@ -173,7 +173,7 @@ public class GPSExtractor {
|
||||||
Log.d("Coords", "Latitude and Longitude are " + decimalCoords);
|
Log.d("Coords", "Latitude and Longitude are " + decimalCoords);
|
||||||
return decimalCoords;
|
return decimalCoords;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double convertToDegree(String stringDMS){
|
private double convertToDegree(String stringDMS){
|
||||||
double result;
|
double result;
|
||||||
String[] DMS = stringDMS.split(",", 3);
|
String[] DMS = stringDMS.split(",", 3);
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,15 @@ import com.android.volley.toolbox.Volley;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import fr.free.nrw.commons.caching.CacheController;
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class MwVolleyApi {
|
public class MwVolleyApi {
|
||||||
|
|
||||||
private static RequestQueue REQUEST_QUEUE;
|
private static RequestQueue REQUEST_QUEUE;
|
||||||
|
|
@ -66,8 +66,9 @@ public class MwVolleyApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds URL with image coords for MediaWiki API calls
|
* Builds URL with image coords for MediaWiki API calls
|
||||||
* Example URL: https://commons.wikimedia.org/w/api.php?action=query&prop=categories|coordinates|pageprops&format=json&clshow=!hidden&coprop=type|name|dim|country|region|globe&codistancefrompoint=38.11386944444445|13.356263888888888&
|
* Example URL: https://commons.wikimedia.org/w/api.php?action=query&prop=categories|coordinates|pageprops&format=json&clshow=!hidden&coprop=type|name|dim|country|region|globe&codistancefrompoint=38.11386944444445|13.356263888888888&generator=geosearch&redirects=&ggscoord=38.11386944444445|1.356263888888888&ggsradius=100&ggslimit=10&ggsnamespace=6&ggsprop=type|name|dim|country|region|globe&ggsprimary=all&formatversion=2
|
||||||
* generator=geosearch&redirects=&ggscoord=38.11386944444445|13.356263888888888&ggsradius=100&ggslimit=10&ggsnamespace=6&ggsprop=type|name|dim|country|region|globe&ggsprimary=all&formatversion=2
|
* @param coords Coordinates to build query with
|
||||||
|
* @return URL for API query
|
||||||
*/
|
*/
|
||||||
private String buildUrl (String coords){
|
private String buildUrl (String coords){
|
||||||
|
|
||||||
|
|
@ -134,7 +135,6 @@ public class MwVolleyApi {
|
||||||
@Override
|
@Override
|
||||||
protected Response<QueryResponse> parseNetworkResponse(NetworkResponse response) {
|
protected Response<QueryResponse> parseNetworkResponse(NetworkResponse response) {
|
||||||
String json = parseString(response);
|
String json = parseString(response);
|
||||||
//Log.d(TAG, "json=" + json);
|
|
||||||
QueryResponse queryResponse = GSON.fromJson(json, QueryResponse.class);
|
QueryResponse queryResponse = GSON.fromJson(json, QueryResponse.class);
|
||||||
return Response.success(queryResponse, cacheEntry(response));
|
return Response.success(queryResponse, cacheEntry(response));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue