Add Photo Sphere support to any website - gHacks Tech News

Add Photo Sphere support to any website

One of the coolest new features of Android 4.2 is Photo Sphere, a native photo application that you can use to create 360 degree panoramas that are saved as a single image. The application displays a three dimensional room when you open it that you fill by taking photos of all directions that appear in gray on the screen. All the photos that you have taken in the process are then processed by the application and saved as a single image. Metadata is added to the phone that contains information relevant to create the panorama.

These images can be viewed in the Android phone directly, or published on Google+ or Google Maps. While that is great and all, there has not been an option until now to publish the images on your own website or another third party website.

photo sphere

One of the developers of the Photo Sphere application has not released code that webmasters can add to their sites to display Photo Sphere images without Google+ or Google Maps. A test image has been uploaded to Github that you can load to see how it looks like on a third party website. Just click on the makeIt link to load the image and rotate around the Panorama.

The instructions to use the the code are posted on the official project Github website. All you need to do is embed JavaScript files on load and a single line of code to add the functionality to the web page the code is run on. A good starting point is the example code that is provided on the project website (in text.html) which highlights how you reference the JavaScript files in the code and run the command that is displaying the image on the screen.

There is also sample code to get this working in image gallery apps or apps that are able to read EXIF XMP tags.

For now, this is not more than a theory as you probably do not have access to Photo Sphere images or an Android 4.2 smartphone that includes the feature natively. It is likely that we will see plugins for popular services such as WordPress if the Photo Sphere feature proves to be popular. (via Caschy)


We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Previous Post: «
Next Post: »


There are no comments on this post yet, be the first one to share your thoughts!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.