July 2015
Beginner to intermediate
600 pages
18h 59m
English
To actually plot your image on this map, you need to know where it is. Add an additional “extra” parameter to your Flickr API query to fetch a lat-lon pair back for your GalleryItem.
Listing 32.7 Adding lat-lon to query (FlickrFetchr.java)
private static final String API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; private static final String FETCH_RECENTS_METHOD = "flickr.photos.getRecent"; private static final String SEARCH_METHOD = "flickr.photos.search"; private static final Uri ENDPOINT = Uri.parse("https://api.flickr.com/services/rest/") .buildUpon() .appendQueryParameter("api_key", API_KEY) .appendQueryParameter("format", "json") .appendQueryParameter("nojsoncallback", "1") .appendQueryParameter("extras", ...Read now
Unlock full access