-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panorama #234
Panorama #234
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Dlurak , i am glad you explored the topic! Pano viewer is a great addition to osmapp.
Here are some points, which changes the current behaviour/style, would you be able to fix them?
if (image.isPano) { | ||
const pannellumUrl = `https://cdn.pannellum.org/2.5/pannellum.htm#panorama=${encodeURIComponent( | ||
image.thumb, | ||
)}&autoLoad=true`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the panellum controls are not necessary, can you hide them? It kinda collides with the map controls (+/-) and pano is not the primary information of the page, so we don't want the user to be distracted that much 🙂
Instead we can perhaps add autoRotate=-1
which helps users find that it is movable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair points, but I personally think that the full screen button is quite nice as there is no other way to get this fully immersive view without leaving osmapp and going to mapilarry itself. What do you think of keeping the full screen button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i agree. Lets leave it now, until there is another way of enlarging it. Good point! 👍
Can you try to remove the +/-, then? If it is not possible, it is not a blocker :)
Sorry for the late updates, I totally forgot about this pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I am impressed. Good job! The standalone config, the overlay divs, everything works great. I found one bug and few ideas, see here:
'linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.09) 76%, #5b5b5b)', | ||
position: 'absolute', | ||
width: '100%', | ||
height: '3rem', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please make it 100% (perhaps by adding top:0) ? This gradient was meant for the full-height image, your div now is high only 3rem.
The gradient then should spread as it was before.
return ( | ||
<> | ||
{pannellumUrl && ( | ||
<iframe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also when I open this link https://osmapp-git-fork-dlurak-panorama-osm-app-team.vercel.app/node/6504183373 - i get the following bug. Do you have any idea why could this happen?
It looks like it happens only in SSR mode. But useEffect is only executed once on the client. 🤔 .. the above suggestion remove url state may help with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very weird, I can't even reproduce it :/
When I open the very same link it works perfectly fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for me now too. Could it be perhaps by mapillary returning an empty set? I remember it happend from time to time.
Nevertheless, we can let it be and observe if it ever happens again :)
return { | ||
source: 'Mapillary', | ||
link: `https://www.mapillary.com/app/?focus=photo&pKey=${sorted[0].id}`, | ||
thumb: sorted[0].thumb_1024_url, | ||
timestamp: new Date(sorted[0].captured_at).toLocaleString(), | ||
thumb: imageToUse.thumb_1024_url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, when i click the fullscreen button on the viewer, the image is pretty pixelated. Is there perhaps any option to use some HD version for panos?
But this one is not a blocker to merge this PR. Feel free to leave it 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok the way I just did it?
Panorama images get the full original image. Normal images still only the 1024p image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you very much. I really love this feature :) merging it right away 👍
This closes #231 using Pannellum.
//Edit Updated links: