public void setLocation(String photoId, GeoData location) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_SET_LOCATION);

        parameters.put("photo_id", photoId);
        parameters.put("lat", String.valueOf(location.getLatitude()));
        parameters.put("lon", String.valueOf(location.getLongitude()));
        int accuracy = location.getAccuracy();
        if (accuracy > 0) {
            parameters.put("accuracy", String.valueOf(location.getAccuracy()));
        }

        // Note: This method requires an HTTP POST request.
        Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
        // This method has no specific response - It returns an empty sucess response
        // if it completes without error.
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
public void setLocation ( String photoId , GeoData location ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_SET_LOCATION ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "lat" , String . valueOf ( location . getLatitude ( ) ) ) ; parameters . put ( "lon" , String . valueOf ( location . getLongitude ( ) ) ) ; int accuracy = location . getAccuracy ( ) ; if ( accuracy > 0 ) { parameters . put ( "accuracy" , String . valueOf ( location . getAccuracy ( ) ) ) ; } Response response = transport . post ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } }
Sets the geo data (latitude and longitude and, optionally, the accuracy level) for a photo. Before users may assign location data to a photo they must
define who, by default, may view that information. Users can edit this preference at <a href="http://www.flickr.com/account/geo/privacy/">flickr</a>. If
a user has not set this preference, the API method will return an error.

This method requires authentication with 'write' permission.

@param photoId
The id of the photo to cet permissions for.
@param location
geo data with optional accuracy (1-16), accuracy 0 to use the default.
@throws FlickrException