This interface is deprecated.
The Google Play Services Places SDK is deprecated. A new SDK is available.
See the client
migration guide for more information.
The metadata corresponding to a single photo associated with a place.
Public Method Summary
abstract CharSequence |
getAttributions()
Returns the attributions that must be shown to the user if this photo is
displayed.
|
abstract int |
getMaxHeight()
Returns the maximum height in which this photo is available.
|
abstract int |
getMaxWidth()
Returns the maximum width in which this photo is available.
|
abstract PendingResult<PlacePhotoResult> | |
abstract PendingResult<PlacePhotoResult> |
getScaledPhoto(GoogleApiClient
client, int width, int height)
Retrieves the image data for this photo, scaled to fit the given dimensions.
|
Inherited Method Summary
Public Methods
public abstract CharSequence getAttributions ()
Returns the attributions that must be shown to the user if this photo is displayed.
See Displaying Attributions for more details.
Returns
- The attributions in HTML format, or null if there are none.
public abstract int getMaxHeight ()
Returns the maximum height in which this photo is available.
Returns
- The maximum height in pixels.
public abstract int getMaxWidth ()
Returns the maximum width in which this photo is available.
Returns
- The maximum width in pixels.
public abstract PendingResult<PlacePhotoResult> getPhoto (GoogleApiClient client)
Retrieves the image data for this photo at its maximum size.
The photos service may cache the image data. If the requested photo does not exist in the cache then a network lookup will be performed.
Access to this method is subject to quota restrictions. See Usage Limits for more details.
NOTE: When using a GeoDataClient
,
you should call
getPhoto(PlacePhotoMetadata)
rather than this method.
Returns
- A PendingResult including the result of the request and (if successful) a
Bitmap
of the image data.
public abstract PendingResult<PlacePhotoResult> getScaledPhoto (GoogleApiClient client, int width, int height)
Retrieves the image data for this photo, scaled to fit the given dimensions.
The image will be scaled to match the smaller of the given dimensions whilst maintaining the original aspect ratio. This scaling is performed server-side.
The photos service may cache the image data. If the requested photo does not exist in the cache then a network lookup will be performed.
Access to this method is subject to quota restrictions. See Usage Limits for more details.
NOTE: When using a GeoDataClient
,
you should call
getScaledPhoto(PlacePhotoMetadata, int, int)
rather than this method.
Parameters
client | |
---|---|
width | The desired maximum width in pixels. |
height | The desired maximum height in pixels. |
Returns
- A PendingResult including the result of the request and (if successful) a
Bitmap
of the image data.
Throws
IllegalArgumentException | If either of the given width or height values are less than or equal to 0. |
---|