Yes that's possible, you need to calculate the distance between your coordinates and the rest of the scenes, then sort them, choose the nearest one , and finally load that pano.
If you would need further help I can writte that plugin for you, just send me a PM.