Class PlacePhotoRequest
- Namespace
- GoogleMapsApi.Entities.PlacesNew.Request
- Assembly
- GoogleMapsApi.dll
Request for the Places API (New) Photo media endpoint
(GET https://places.googleapis.com/v1/{photoName}/media). Resolves a photo reference
returned on Name to a usable image URI.
public sealed class PlacePhotoRequest : MapsBaseRequest
- Inheritance
-
PlacePhotoRequest
- Inherited Members
Remarks
Uses skipHttpRedirect=true so the API returns a small JSON document
({ name, photoUri }) rather than redirecting to binary image bytes. At least one of
MaxHeightPx or MaxWidthPx is required.
Properties
MaxHeightPx
Maximum desired height of the image, in pixels (1–4800).
public int? MaxHeightPx { get; set; }
Property Value
- int?
MaxWidthPx
Maximum desired width of the image, in pixels (1–4800).
public int? MaxWidthPx { get; set; }
Property Value
- int?
PhotoName
Resource name of the photo, taken from Place.Photos[].Name
(e.g. places/X/photos/Y). Required.
public string PhotoName { get; set; }
Property Value
Methods
GetUri()
Builds the absolute request URI, including scheme, base URL, and serialized query-string parameters.
public override Uri GetUri()
Returns
- Uri
The fully composed URI to send to the Google Maps API.