Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
GeoPal
Experienced
Topic Author
Posts: 227
Joined: 20 Dec 2007, 12:56

Geo Tag for flat panoramas

15 Jul 2019, 05:52

Hi Karl,
Today I tried to link tiles from Amazon S3, which I succeeded, but here are a few things I could not solve:
- I did put a geotag on my preview image, but as it loads tiles from CDN, there was no info button with map on the flat panorama. How can we work around that?
- What is the code with preview image linking to the tiles? I have code with text which says "Click here" which opens the pano player.
- The name on the top left was "Panorama_name.tiles" , and I could not figure out how to change the name of the panorama. Should I try it in the Parameters tab of the preview image with Title tag?

Thanks in advance for those small things.
Best regards, G
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Geo Tag for flat panoramas

15 Jul 2019, 10:52

GeoPal wrote:I did put a geotag on my preview image, but as it loads tiles from CDN, there was no info button with map on the flat panorama. How can we work around that?
I thought it would get EXIF GPS from the placeholder image, but I could be mistaken. Anyway, you can easily add GPS via parameters, as noted in the docs:
https://www.photo.gallery/docs/plugins/panorama/
Code
geo=39.721563,21.632105
Image
GeoPal wrote:What is the code with preview image linking to the tiles? I have code with text which says "Click here" which opens the pano player.
You mean for a custom link in your CONTENT? You need to include necessary parameters inside the links <a data-panorama="">. More about this in docs under "panorama links in content":
https://www.photo.gallery/docs/plugins/panorama/

If it's a flat panorama, you need to extrapolate and include a lot of into, which X3 otherwise might get from pano.xml if the panorama is included in the gallery.
GeoPal wrote:The name on the top left was "Panorama_name.tiles" , and I could not figure out how to change the name of the panorama. Should I try it in the Parameters tab of the preview image with Title tag?
Exactly.
Code
title=Your title here
 
User avatar
GeoPal
Experienced
Topic Author
Posts: 227
Joined: 20 Dec 2007, 12:56

Re: Geo Tag for flat panoramas

16 Jul 2019, 01:26

Thank you Karl, I did write the geo=.... in the placeholder image but it didn't appear. Might be browser cache problem?
This is the code I used to use before you wrote the panorama plugin:
Code
<a href="#" data-embed-modal="https://gigapanos.s3.eu-west-2.amazonaws.com/Monopoli_sunrise/index.html"><img src="{{path}}preview.jpg" alt="" /></a>
I am trying to put image in this code:
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>
The code from the doc section also doesn't give me a preview, but just text with link
Code
<a href="preview.jpg" data-panorama="path=myflat&amp;tilesize=2048&amp;width=1024,3072,6144,12288,23552&amp;height=404,1208,2416,4832,9260&amp;url_format=l1/%0v/l1_%0v_%0h.jpg">flat</a>
So that was my question - how to have a preview image with geo data which links to external location of tiles for flat panos. Again, most probably I am not writing the code as it should be.
Thanks again for your help!
Best regards, G
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Geo Tag for flat panoramas

16 Jul 2019, 03:47

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
Image
GeoPal wrote:This is the code I used to use before you wrote the panorama plugin:
Code
<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:
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:
Image
browser error wrote:Access to image at 'http://gpalov.nimahosts.com/Kovachevits ... _01_01.jpg' from origin 'http://x3test.locl' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
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
Code
<a href="preview.jpg" data-panorama="path=myflat&amp;tilesize=2048&amp;width=1024,3072,6144,12288,23552&amp;height=404,1208,2416,4832,9260&amp;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".
 
User avatar
GeoPal
Experienced
Topic Author
Posts: 227
Joined: 20 Dec 2007, 12:56

Re: Geo Tag for flat panoramas

16 Jul 2019, 05:06

The link with the tiles was just an example and not something real world and working. Will check your advices and write back, thanks!