I don't fully understand what it is you're trying to do.
- Do you have a panoramic photo already, or do you need to do the stitching as well
- Is it 360 degrees is the pan (horizontal) direction only, or 360 degrees in both the pan and tilt (vertical) directions? This won't change much other than controls and how you need to loop your stitching if the panning and tilting is to be controlled.
I have a couple of suggestions:
OpenCV is an open-source library which has been used on smart phones before. It has some image stitching capabilities built into it, but you can also develop your own. It has support for a wide variety of programming languages. There is good community support for OpenCV at their
Yahoo Groups page.
OpenGL is most likely what you will need to use in order to display the panning and tilting. I have no idea about how to deal with this on websites, smart phones, or any non-Windows or -Linux computer, so I can't help you much there. OpenGL is built into most systems by default.
I think
Panotools is compatible with smart phone applications. They are open-source, but a bit more difficult to dive into.
With all of these tools, I'm not sure if you can implement them in Javascript or some other online programming language as I've never needed to try this. You should be able to use these as starting points at least.
Good luck.