Day 22
kevinwang-oversoul opened this issue · comments
Hi,
I was looking at the same issue yesterday, and found you had a solution as well.
Are you using the paid google street view api? Would you explain a bit more of the code? Thanks!
And is there a way to get the panoid according to the latitude and longitude?
var baseUrl = URL(string: "https://streetviewpixels-pa.googleapis.com/v1/tile")!
let paramsCommon: [URLQueryItem] = [
URLQueryItem(name: "cb_client", value: "maps_sv.tactile"),
URLQueryItem(name: "panoid", value: panoId),
URLQueryItem(name: "zoom", value: "(3)")
]
baseUrl.append(queryItems: paramsCommon)
For the PoC code, I did not use the paid Google street view API.
panoid was obtained almost manually from the street view URL this time.
You can get the metadata at https://maps.googleapis.com/maps/api/streetview/metadata and Although there is a panoId in it,
In some cases, old or new format panoId is returned, and the new format cannot be used as it is.
It seems to me that the correct way is to use a paid API to get it.
Thanks!