GeoPal wrote:
Thank you Karl, I did write the geo=.... in the placeholder image but it didn't appear. Might be browser cache problem?
Url? I don't see how it's a cache problem.
Even the panoramas in our X3 demo gallery all have geo set from parameters. They are also loaded externally.
https://demo.photo.gallery/examples/plugins/panorama/
https://demo.photo.gallery/panel/ guest:guest
GeoPal wrote:This is the code I used to use before you wrote the panorama plugin:
<a href="#" data-embed-modal="https://gigapanos.s3.eu-west-2.amazonaws.com/Monopoli_sunrise/index.html"><img src="{{path}}preview.jpg" alt="" /></a>
This of course is just opening an external exported panorama in a modal popup, and doesn't really have anything to do with the X3 panorama plugin.
GeoPal wrote:I am trying to put image in this code:
<a data-panorama="tilesize=2048&url_format=l{z}/{y}/l{z}_{y}_{x}.jpg&zero_padding=2&index_start=1&width=1024,2560,5120,10496,20992,41984,84032&height=346,866,1728,3542,7086,14170,28362&path=http://gpalov.nimahosts.com/Kovachevitsa/Kovachevitsa.tiles">Click here</a>
I think you have been dealing with Access-Control-Allow-Origin issues before:
It would probably work if the above was fixed.
GeoPal wrote:The code from the doc section also doesn't give me a preview, but just text with link
<a href="preview.jpg" data-panorama="path=myflat&tilesize=2048&width=1024,3072,6144,12288,23552&height=404,1208,2416,4832,9260&url_format=l1/%0v/l1_%0v_%0h.jpg">flat</a>
I don't quite understand the question. In the example above, there is only a TEXT LINK. What "preview" are you expecting? The reason it says href="preview.jpg" in the link, is purely for aesthetic reasons (for example, if a bot or a browser without javascript would click the link, it would display the image that represents the panorama).
If you need an image to be the link, you would need to include an <img> inside the link: <a><img src="..."></a>.
And just to be clear, if you use the GALLERY, it will automatically have a placeholder image of course. All your examples are from adding panoramas into your custom CONTENT, in which case the data-panorama parameter will trigger the panorama, but what the link looks like, you will have to create the html for yourself.
GeoPal wrote:So that was my question - how to have a preview image with geo data which links to external location of tiles for flat panos.
I think there must be some misunderstanding. When using the X3 GALLERY to represent panoramas, then the images that you upload into the gallery are the placeholder images, that work as previews for each panorama. In your case, with your custom links, which could only be added to custom CONTENT, there is no such concept as preview or placeholder, because it's not a gallery layout. When someone clicks your custom panorama link, the panorama loads, there is no "preview" or "placeholder", and that's that. So attempting to add a preview or placeholder image to custom panorama links in your custom content is not logical and has no cause ... Instead, you need to use parameters inside data-panorama.
GeoPal wrote:
Thank you Karl, I did write the geo=.... in the placeholder image but it didn't appear. Might be browser cache problem?
Considering the above, I have to go back to this question. I can't quite see how you are adding "placeholder" image to your custom content panorama links. Placeholder images are for the X3 GALLERY, where you need a placeholder image to represent each panorama, unless it's a single-file equirectangular panorama, in which case the placeholder itself could be the panorama. The X3 gallery is also more powerful, because a placeholder image can be used to assign title and GPS data for the panorama that it represents. For a content link <a href="preview.jpg" data-panorama=""></a>, X3 has the capabilities to read data-panorama settings via javascript, but it cannot extract info from source file in "href", first of all because that requires PHP/backend, but also because it's not logical to assign a preview image for a plain text link, just for the cause of assigning data to the panorama itself.
Essentially, as long as you are trying to add panorama links to custom content, the answer is parameters that go inside data-panorama="geo=48.6938092,12.8045811".