Skip to content
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

Merged
merged 14 commits into from
Apr 15, 2024
Merged

Panorama #234

merged 14 commits into from
Apr 15, 2024

Conversation

Dlurak
Copy link
Collaborator

@Dlurak Dlurak commented Feb 10, 2024

Copy link

vercel bot commented Feb 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Apr 15, 2024 8:46am

Copy link
Owner

@zbycz zbycz left a 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`;
Copy link
Owner

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.

Copy link
Collaborator Author

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?

Copy link
Owner

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 :)

@Dlurak
Copy link
Collaborator Author

Dlurak commented Apr 8, 2024

Sorry for the late updates, I totally forgot about this pr.

Copy link
Owner

@zbycz zbycz left a 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',
Copy link
Owner

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.

src/services/types.ts Outdated Show resolved Hide resolved
src/components/FeaturePanel/ImageSection/Photo.tsx Outdated Show resolved Hide resolved
return (
<>
{pannellumUrl && (
<iframe
Copy link
Owner

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.

image

Copy link
Collaborator Author

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

Copy link
Owner

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,
Copy link
Owner

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 🙂

Copy link
Collaborator Author

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

Copy link
Owner

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 👍

@zbycz zbycz merged commit e895abe into zbycz:master Apr 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add panorama viewer for Mapillary panos
2 participants