Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsGooglePlacesResult.Photo Class Reference

Photo objects, contains a reference to an image. More...

Public Member Functions

 Photo (OnlineMapsXML node)
 Constructor.
 
OnlineMapsGooglePlacePhoto Download (string key, int? maxWidth=null, int? maxHeight=null)
 Download photo from Google Places.
 

Public Attributes

int width
 The maximum width of the image.
 
int height
 The maximum height of the image.
 
string photo_reference
 String used to identify the photo when you perform a Photo request.
 
string[] html_attributions
 Contains any required attributions. This field will always be present, but may be empty.
 

Detailed Description

Photo objects, contains a reference to an image.

Constructor & Destructor Documentation

◆ Photo()

OnlineMapsGooglePlacesResult.Photo.Photo ( OnlineMapsXML node)

Constructor.

Parameters
nodePhoto node from response

Member Function Documentation

◆ Download()

OnlineMapsGooglePlacePhoto OnlineMapsGooglePlacesResult.Photo.Download ( string key,
int? maxWidth = null,
int? maxHeight = null )

Download photo from Google Places.

Parameters
keyGoogle Maps API Key.
maxWidthSpecifies the maximum desired width, in pixels, of the image returned by the Place Photos service.
If the image is smaller than the values specified, the original image will be returned.
If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio.
maxWidth accept an integer between 1 and 1600.
maxHeightSpecifies the maximum desired height, in pixels, of the image returned by the Place Photos service.
If the image is smaller than the values specified, the original image will be returned.
If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio.
maxHeight accept an integer between 1 and 1600.
Returns
Instance of a request