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

Fix broken light (invalid use of heavy dependencies) #1449

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

okimiko
Copy link
Contributor

@okimiko okimiko commented Jan 16, 2025

  • Move elevation calculation to serve_rendered and stub in serve_light due to use of canvas and sharp
  • Elevation API is not available for light!

Possible fix for #1448

Miko added 4 commits January 16, 2025 23:58
- move elevation calculation to serve_rendered and stub in serve_light due to use of canvas and sharp
- elevation api is not available for light
@acalcutt
Copy link
Collaborator

Do you know if the is a isLight flag in the template? it might be goot to not show the elevation display on the terrain page..

@acalcutt
Copy link
Collaborator

I am fine with moving this to serve_rendered.js for now. though I have been thinking about ways to shorten that file since it is quite large (like separating it out into other files a bit)

maybe we could make a terrain.js file and for now have it access through rendering so we don't need a new dummy file.. idk. this could be a first step though to at least get light working.

@okimiko
Copy link
Contributor Author

okimiko commented Jan 17, 2025

Yes, in general it not the best solution, but may be I had chosen this before, too, just to not have multiple locations with different code. And in fact because we use images here, it is a kind of rendering, too.

I tested light and normal again, looks fine now and finaly: I removed the control in light mode, too :)

@okimiko okimiko marked this pull request as ready for review January 17, 2025 21:47
@acalcutt
Copy link
Collaborator

can you also hide this elevation url? since that is unavalable in light

image

@okimiko
Copy link
Contributor Author

okimiko commented Jan 17, 2025

Done. I added a note to the docs, too.

@acalcutt
Copy link
Collaborator

acalcutt commented Jan 17, 2025

Does preview terrain get hidden when that link is gone? It seemed like that part still worked ok but now it doesn't show

image

@okimiko
Copy link
Contributor Author

okimiko commented Jan 17, 2025

Yes, now the links are handled in dedicated flags.

Copy link
Collaborator

@acalcutt acalcutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and in looks good to me

@acalcutt acalcutt merged commit f02c63c into maptiler:master Jan 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants