Google Maps Embed API Panorama ID
Asked Answered
S

3

3

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?

Subhead answered 11/9, 2015 at 12:8 Comment(1)
Based on the Google Maps Embed API, you can also use the location for your panorama view, you might store the location(latitude and longitude).Hungarian
A
0

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

Aetna answered 6/10, 2015 at 13:38 Comment(2)
Thanks for your reply. The URL for my photosphere is (google.co.uk/maps/@56.3386378,-4.6243378,3a,75y,84.63h,66.9t/…) The ID in here is very clear, although there is a repeating string. I tried using the string and various subsets of it as the ID, but my photosphere wouldn't work. Am I missing something?Subhead
It doesn't look like its possible for photospheres added after Sep 2015 - https://mcmap.net/q/891855/-google-maps-streetview-how-to-get-panorama-idPaff
L
0

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.

Letta answered 12/12, 2016 at 12:1 Comment(0)
W
0

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','/')
Whitman answered 20/7, 2017 at 18:46 Comment(1)
This will only replace the first %2F. If you want to replace all, you have to replace it with Regex: "F:".concat(window.location.href.split("!1s")[1].split("!2e")[0]).replace(/%2F/g,'/')Kayleen

© 2022 - 2024 — McMap. All rights reserved.