| Embedding Sample Code -- fullscreen, snapshots, large views | |
|---|---|
|
Posted:
Feb 27, 2012
Total Posts: 14
|
Hey everyone — Inspired by comments in the two threads about embedding with snapshots and enabling full-screen mode, I started hacking around to come up with some sample code to make a much cleaner interface for viewing gigapan images. Here are a couple sample pages: I’ve posted the sample code to github — so everyone can download and modify it to suit their needs: https://github.com/barneyzang/gigapan-embedlarge Most of this code is based on snooping the output of the gigapan.org website and inspiration from Ronnie Miranda’s post in one of the other threads. I’ll be the first to admit that this is a complete hack and that it requires a willingness to modify html source files (though, it’s relatively straightforward). I’ll also be the first to admit that I’m an html/css/js novice, but hopefully there’s enough there to be useful to someone. Please feel free to suggest improvements (or submit changes to github). — Joe |
|
Posted:
Jun 2, 2012
Total Posts: 14
|
I’ve updated the sample code to dynamically generate the page + image data using php — it’s no longer an (embarrassingly hack-ish) copy/paste job. The php code now takes a single parameter corresponding to the gigapan id. For example: The data is parsed one of two ways: Typically, I always make at least one stitching pass using the Gigapan Stitcher. If I later decide to publish/post an image stitched using Autopano I can copy the output of the original Gigapan stitcher pass (found by clicking on the “More Stitch Notes” button) into the contents of the “Description” field to ensure that the data travels with the image (and will be parsed correctly by this code). Kudos to Jason Buccheim, who’s comments in this thread (http://gigapan.com/forums/14/topics/223) provided further inspiration :) — Joe |
Angelko Krstano...
Posted:
Jun 4, 2012
Total Posts: 103
|
Very clean look, nicely done Joseph! |
Mamoru Suzuki
Posted:
Jun 5, 2012
Total Posts: 7
|
Hi Joseph |
Eddie S
Posted:
Jul 23, 2012
Total Posts: 7
|
Hi Joseph, Thanks, |
|
Posted:
Jul 25, 2012
Total Posts: 14
|
The quick steps would be: This code assumes you have access to a web server with the latest version of php installed (though I’m not aware of any functions that have special version requirements). Note that the latest version includes a few changes to the way snapshots are displayed along the bottom. — Joe |
Eddie S
Posted:
Jul 26, 2012
Total Posts: 7
|
Thank you Joseph, works like a charm. |
|
Posted:
Sep 30, 2012
Total Posts: 14
|
Hi Everyone — I’ve made a few more changes to the checked in code on github: Here’s an example: — Joe |
Angelko Krstano...
Posted:
Oct 3, 2012
Total Posts: 103
|
Very clean, and love the toggled google map layer! |
|
Posted:
Oct 14, 2012
Total Posts: 2
|
Joe, I created the webpage “lastra.net” for my daughter’s photography of Spanish Romanesque sculpture. I just wanted to let you know that your code made all the difference in the world in how effective the webpage is. It was so easy to use, just like magic. However, I had a couple of issues. Two of her images did not work. I don’t know what was different about them. The id numbers for them were very long. Unfortunately, I don’t understand how the gigapans are constructed, so I wasn’t able to follow your code too well except for the parts where you parse the description. If you have any suggestions for how I can debug this, let me know. The id’s for the gigapans that didn’t work are: b66ab511ffdbc1b6d7b3029276c96bbe and 684e2b826339e5b9010d2034d2fb7488 When the program tries to display the image, the description stuff looks right, but the image itself is black, and a little message is displayed that says “8 images to load”. Please don’t feel like I am trying to get you to work on these, I’m just hoping you have some idea of how I could work on them. Thanks, |
|
Posted:
Oct 15, 2012
Total Posts: 14
|
Looking at the IDs, I think the issue may be that the problematic gigapans are marked as “private”. You’ll need to make sure the “Is Private” checkbox is un-checked when editing the gigapan. A new, shorter ID will be generated. — Joe |
|
Posted:
Oct 15, 2012
Total Posts: 2
|
Thank you Joe, you were exactly right, now all the images are perfect!!!!! You’re the greatest! |
|
Posted:
Oct 21, 2012
Total Posts: 73
|
Joe – thanks for the work you put into this. It will solve many website problems for me if I can get it to work. I uploaded the files to my two web accounts (hosted by 1&1.com) and tried it out. I get the following errors on every ID that I try: On one I get: Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/3/d430221224/htdocs/PSC/gigapan.large.php on line 26 Warning: file_get_contents(http://www.gigapan.com/gigapans/33692.json) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/3/d430221224/htdocs/PSC/gigapan.large.php on line 26 Warning: Division by zero in /homepages/3/d430221224/htdocs/PSC/gigapan.large.php on line 178 and on the other one I get: Fatal error: Call to undefined function: json_decode() in /homepages/14/d108112798/htdocs/IOTU2012/gigapan.large.php on line 28 I can use either one to host your code for my website. Any clue what I did wrong on either of them? |
|
Posted:
Oct 22, 2012
Total Posts: 14
|
From the errors you’re getting, it looks like the function “file_get_contents” hasn’t been enabled (some providers leave this off as a default security setting). You’ll probably need to add something like this to your php.ini file: — Joe |
|
Posted:
Oct 25, 2012
Total Posts: 73
|
That did it. I got another error regarding the datetime function, but deleting that section of your PHP file solved it. I don’t care about providing that info anyway. Thanks again! |
|
Posted:
Oct 30, 2012
Total Posts: 1
|
Hi Joseph, thank you for the all the code and how to do this, I have got it working perfectly. I am trying to display some artwork, and have managed to remove the camera information and location information as that is not relevant. However I want to be able to show the snapshot info / comments as in the snapshots info I can add hyperlinks to additional information. I am digging through the code but can’t seem to be able to find or do this ? Is there a parameter that I can enable this ? |
|
Posted:
Oct 31, 2012
Total Posts: 14
|
It’s a little unclear what behavior you’re trying to achieve, but the best place to start looking is in the javascript that builds the snapshot list: This is code that’s almost entirely drawn from the regular gigapan.com pages, and parses the json encoded snapshots for the particular gigapan. The extra info / links should be in the “description” field of each snapshot. — Joe |
|
Posted:
Nov 17, 2012
Total Posts: 73
|
Hey Joe, is there any way to make it start in fullscreen mode? |
|
Posted:
Nov 25, 2012
Total Posts: 14
|
Full screen mode is controlled by the flash-based Gigapan viewer — which is built and maintained by the Gigapan engineering team. There is no public documentation — so it might be possible — but I’m not aware of a way to trigger full-screen mode when the page loads. — Joe |
|
Posted:
Dec 20, 2012
Total Posts: 8
|
Hi Joseph, thank you for developing these codes. They are the easiest and simplest to use at the same time have all the features and functionality of the full GigaPan viewer. I particularly like the toggle for Google Maps. To all users, you can actually further customize Joseph’s codes by choosing only the info you want displayed. For example, here it is applied with the full image size and the full frame viewer, without the snapshots and other info. http://www.ashleydrody.com/gigapixel/gigapixel…. It can also be used in an iframe (stripped down) and is actually much better than GigaPan’s default embed codes. |
|
Posted:
Jan 18, 2013
Total Posts: 2
|
Hello. Thanks for the great tool. I am getting an error message only with my own Gigapan. Here is the error message: Fatal error: Call to undefined method DateTime::createFromFormat() in /home/content/95/2447795/html/gigapan/gigapan.large.php on line 161 http://www.kedl.com/gigapan/gigapan.large.php?i… It works if I change the id to another gigapan…. Thanks! Andre |
|
Posted:
Jan 19, 2013
Total Posts: 14
|
Looks like the “Stitcher Notes” (or $imageDetails array in the php code) doesn’t have valid ‘Capture time’ data. I’ve updated the php code to check for invalid values before parsing and the error appears to be fixed. The code has been updated on github and on the original example links above — you should be able to download a fresh copy and get it to work with your gigapan. — Joe |
|
Posted:
Jan 19, 2013
Total Posts: 2
|
Wow. Quick answer. It’s works. Many thanks! Andre |
|
Posted:
Jan 22, 2013
Total Posts: 1
|
Does this work for wordpress themes and can you write a 1 2 3 how to do this tutorial |
|
Posted:
Jan 23, 2013
Total Posts: 14
|
I’m not familiar with wordpress themes, so I don’t know the answer your question. The code is intended to be portable (and others have gotten it to work in iframes) so it’s probably possible to make it work — but someone with wordpress experience may have to weigh-in. — Joe |



