1. Skip to navigation
  2. Skip to content
  3. Skip to sidebar


Welcome to the GigaPan Forum!

This is the place for Gigapan.com members to offer peer-to-peer support for exchanging tips, ideas, comments, etc.

Those who need direct technical assistance with their GigaPan EPIC Series imagers, stitching software or gigapan.com membership account should contact us.

Forums » Embedding » Embedding Sample Code -- fullscreen, snapshots, large views

Embedding Sample Code -- fullscreen, snapshots, large views
Gregory Young Gregory Young
Total Posts: 20

I’m new to embedding this way. I’m getting these errors.
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Warning: Unknown: Failed opening ‘/vservers/gregyoungphoto/htdocs/gallery/setup/php_value_ok.php’ for inclusion (include_path=‘.:/opt/php/lib/php’) in Unknown on line 0

Any ideas? Thanks, Greg

Joseph Saracino Joseph Saracino
Total Posts: 20

Hi Greg — it’s hard to tell from your post what the problem is. I’ll respond to your private message to try to work through the problems and then post what we’ve found so that others can learn from it.

— Joe

Gregory Young Gregory Young
Total Posts: 20

Just a quick note to thank Joe. His code is working fine for me now. I was having some problems and my host told me “The function json_decode() requires at least PHP 5.2.0” My server had 5.1.6. I’ve migrated to a different server with 5.3 and everything works great. Greg

Joseph Saracino Joseph Saracino
Total Posts: 20

Hey Everyone —

Updated the code posted to github (as well as at the links earlier in this thread) to use the new mobile device support code. It can be tested by setting the user agent for your browser to an iOS or Android device.

The SeaDragon stuff (the underlying technology for mobile devices) is pretty cool, but there are a couple things I’d like to change:
1. A “view-all” type button that effectively resets the view to the default state. The flash version has this and it’s very handy to get back to where you started.
2. When selecting between snapshots, the view needs to zoom-out before going to the next snapshot — also like the flash version. With the current implementation it’s easy to lose perspective of where you are in the overall image.

I may hack into these issues in the future.

— Joe

Ronnie Miranda Ronnie Miranda
Total Posts: 24

Hi Joe,
Great work on the new code that’s now compatible with Android devices! I’m using it on my site www.gigapixel.com. Thanks!

larry luckham larry luckham
Total Posts: 4

It seems that much of the embedding of Gigapans is done by linking to the www.gigapan.com website and utilizing their code for the actual display. While that’s a great solution for most I have something of a different need. I need to be able to store and display Gigapans on a private server that does not reference outside sources. That means not linking to www.gigapan.com and not using a commercial ISP for the website.

Perhaps someone else using these as forensic files has encountered the same problem. Is there a way to embed a Gigapan, on an Intranet, for example, that would allow it to be displayed with all the usual features such as pan, zoom, etc. without linking to the Internet?

Mosley Hardy Mosley Hardy
Total Posts: 138


mhuneault mhuneault
Total Posts: 1

Hi Joe,

Been trying to use you code. Once all installed on my server (with PHP 5.4), I always get :

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/35/d250989200/htdocs/gigapan.large.php on line 31

Warning: file_get_contents(http://www.gigapan.com/gigapans/137509.json) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/35/d250989200/htdocs/gigapan.large.php on line 31

Fatal error: invalid gigapan id = 137509 in /homepages/35/d250989200/htdocs/gigapan.large.php on line 34

any idea how to solve this?



Ronnie Miranda Ronnie Miranda
Total Posts: 24

mhuneault, the error is because the GigaPan with ID = 137509 does not exist.

Joseph Saracino Joseph Saracino
Total Posts: 20

Hi Everyone — another round of changes have been checked in:

1. The code has been updated to better support mobile devices (it adapts to both tablet and phone sizes) and uses the new gigapan.com controls.

2. The snapshot carousel has been migrated to bxslider, which is much lighter-weight and supports touch interaction. It’s also the same code used by gigapan.com.

3. It’s now possible to force use of the SeaDragon viewer always (desktop and mobile) or use the Flash viewer when appropriate (only desktop).

4. Lots of other general clean-up and refactoring.

Code has been updated at links earlier in this thread and on github: https://github.com/barneyzang/gigapan-embedlarge

Here’s another example:

— Joe

Johan Boom Johan Boom
Total Posts: 2

make your gigapixel also automatic visable on a iPhone/ iPad:

Add between:

The code:

if (navigator.userAgent && (
navigator.userAgent.indexOf(“iPad”) > -1 ||
navigator.userAgent.indexOf(“iPhone”) > -1 ||
navigator.userAgent.indexOf(“iPod”) > -1


Works fine on my website:


xxxxx = the id of your panorama on the Gigapan website.


Joseph Saracino Joseph Saracino
Total Posts: 20

Hi Johan —

(I sent you a private message but haven’t heard back, so I’ll reiterate here).

I’m a little confused by your post. The latest version of the gigapan.embedlarge code checked in to github should already automatically support iOS devices (and dynamically adjust layout to support different screen sizes). Is there something in the current code that isn’t working?

How would you propose integrating the changes in your post to the currently checked in sources?


— Joe

panorame slovenije panorame sloven...
Total Posts: 1

Hi Joseph,
i have instaled your lates code from github,
but the visible controls for panorama are old? Is that gigapan server issue or i have done something wrong?




Joseph Saracino Joseph Saracino
Total Posts: 20

Hi Miha — I think the issue is that you need to force use of the new SeaDragon viewer.

There’s a javascript variable “forceShowSDViewer” that can be set to “true”. I’ve written up some small details about this in the wiki on the github repo:

— Joe

Bernhard Schmitz Bernhard Schmit...
Total Posts: 1

Hi great work!! I like it very much but I can use it only on my local system. If I store it on my website I only get a white screen and an entry in my error log from my hosting company ([Sun Oct 27 19:51:03 2013] [error] [client] PHP Fatal error: invalid gigapan id = in /is/htdocs/wp11004771_HAUG7FK626/www/own/bschmitz/gigapans/gigapan.large/parse_gigapan_json.php on line 20). It seemed for me that the ID for example 142626 which is one of my picture is not handled correct. So please could you provide me with some instruction wich PHP setting are neccessary and which values do I have to enter.
I use the same PHP version local 5.3.26 as my provider does.

Thanks Bernhard

Joseph Saracino Joseph Saracino
Total Posts: 20

From the code, it looks like file_get_contents() is failing for some reason. This may be a security restriction of your hosting provider, but it’s hard to tell without poking around at the code on your site.

You could try printing out the return value to see what it’s actually returning from this function (eg, change $id to $contents in the error handling block).

If that doesn’t provide any more clues, my recommendation is to follow-up with your hosting provider and ask if they have any policies regarding this function.

— Joe

Joseph Saracino Joseph Saracino
Total Posts: 20

A few more updates checked into the github repository: https://github.com/barneyzang/gigapan-embedlarge

- fixed problem where maps were only loading into the top left corner
- more cleanup / optimizations
- Note that it’s now possible to force use of the SeaDragon viewer via a parameter in the url: “&viewer=sd”

For example: http://saracino.com/gigapan-embedlarge/gigapan….
(note that the forum software appears to be munging the ampersand in the url. It should be:
Here’s another link: http://tinyurl.com/m6olgq9

Sample links earlier in the thread have been updated.

— Joe

Joseph Saracino Joseph Saracino
Total Posts: 20

Made another change that allows control of the map overlay’s FOV arc radius. This is useful if you have an image that includes very distant objects and want the map to properly reflect the context of the shot. Conversely, if you have an image that is closer than the default of 8km, it’s possible to set a smaller value.

Here’s an example with an fovArcRadius set to 40km:

You can see where the fovArcRadius has been added to the Image Details key list in the “Description” here:

Forums» Embedding » Embedding Sample Code -- fullscreen, snapshots, large views