问题
The URL for previous implementations of photosphere panoramas contained the pano ID, making it easy to embed a specific panorama in an iframe. I can't seem to track down ID in the new Google Maps. Is there any method of identifying the ID for a photosphere without resorting to Javascript?
回答1:
I can find the ID two times. Here is an example:
www.google.de/maps/place/Magdeburg/@52.1285424,11.6312738,3a,75y,98h,90t/data=!3m8!1e1!3m6!1s_k_6ZCbrOuYAAAQo8TPM1w!2e0!3e2!6s%2F%2Fgeo3.ggpht.com%2Fcbk%3Fpanoid%3D_k_6ZCbrOuYAAAQo8TPM1w%26output%3Dthumbnail%26cb_client%3Dmaps_sv.tactile.gps%26thumb%3D2%26w%3D203%26h%3D100%26yaw%3D98.389519%26pitch%3D0!7i13312!8i6656!4m2!3m1!1s0x47a5f5ff55daea5b:0x4236659f8071060!6m1!1e1
I got the URL by clicking hte yellow guy (at hte bottom right) once and click one of the orange panorama spots
回答2:
You can take help of chrome or other browser DOM inspect tools.
- Open your photosphere link/url in chrome.
- You will see gallery of thumbnails at bottom, your panorama will be one of them with the 360 icon
- Right click on that thumbnail and click "inspect", and the dom inspector will open
- Keep expanding the DOM tree untill you reach this DIV with class="widget-runway-card-background-flicker-hack-wrapper"
- You will see an image element inside, copy its image url. This is same as the photosphere thumbnail you are viewing in the gallery
The url will be one of the following format (these are dummy)
Case A:
https://lh4.googleusercontent.com/-HXKCf8vxJ-s/Ve_c7LX8HyI/XXXXXAAxtg/J4tLscU2d6g/w203-h101-n-k-no/Case B:
https://geo0.ggpht.com/cbk?cb_client=maps_sv.tactile&authuser=0&hl=nl&output=thumbnail&thumb=2&w=200&h=150&pitch=0&ll=55.2399803333%2C1.851848888888867&panoid=FEpIAbSgOzoAAAQJOQCL3w&yaw=123
For Case A: Add "F:" to the bold string and you will have the final panoID, i.e
F:-HXKCf8vxJ-s/Ve_c7LX8HyI/XXXXXAAxtg/J4tLscU2d6g
For Case B it is very obvious, FEpIAbSgOzoAAAQJOQCL3w.
回答3:
Run the following from the console of developer tools while viewing the pano on Google Maps
"F:".concat(window.location.href.split("!1s")[1].split("!2e")[0]).replace('%2F','/')
来源:https://stackoverflow.com/questions/32523173/google-maps-embed-api-panorama-id