Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Globe - custom layers API and examples, globe dev guide #4577

Merged
merged 35 commits into from
Aug 27, 2024

Conversation

kubapelc
Copy link
Collaborator

This PR adds:

  • extended API for custom layers that makes writing custom layers for globe easier
  • examples of globe custom layers:
  • a writeup / guide of how globe projecton works

Follow the links to read the writeup and see the globe custom layer examples. The custom layer args are now projection-dependent, are filled in by the transform class, and allow the user to write custom layers that under both projections.

globe-custom-simple

globe-custom-tiles

globe-3d-model

@kubapelc
Copy link
Collaborator Author

@HarelM Please ping people who should also review the custom layer API.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 82.33216% with 50 lines in your changes missing coverage. Please review.

Project coverage is 87.49%. Comparing base (ed1437e) to head (0870639).
Report is 69 commits behind head on globe.

Files with missing lines Patch % Lines
src/geo/projection/globe_transform.ts 29.03% 22 Missing ⚠️
src/geo/projection/mercator_transform.ts 69.76% 13 Missing ⚠️
src/util/create_tile_mesh.ts 89.09% 8 Missing and 4 partials ⚠️
src/source/tile_id.ts 66.66% 2 Missing ⚠️
src/render/draw_custom.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            globe    #4577      +/-   ##
==========================================
- Coverage   87.56%   87.49%   -0.07%     
==========================================
  Files         262      263       +1     
  Lines       37166    37293     +127     
  Branches     2588     2559      -29     
==========================================
+ Hits        32545    32631      +86     
- Misses       3556     3602      +46     
+ Partials     1065     1060       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/render/draw_custom.ts Outdated Show resolved Hide resolved
src/render/draw_custom.ts Outdated Show resolved Hide resolved
@klokan
Copy link
Member

klokan commented Aug 19, 2024

Sounds amazing! Thanks @kubapelc

src/render/draw_custom.ts Outdated Show resolved Hide resolved
developer-guides/globe.md Outdated Show resolved Hide resolved
developer-guides/globe.md Outdated Show resolved Hide resolved
developer-guides/globe.md Outdated Show resolved Hide resolved
developer-guides/globe.md Outdated Show resolved Hide resolved
Co-authored-by: Harel M <harel.mazor@gmail.com>
Co-authored-by: Harel M <harel.mazor@gmail.com>
@HarelM
Copy link
Collaborator

HarelM commented Aug 26, 2024

@ibesora let me know if you have other concerns before I merge this into the globe branch.

# Conflicts:
#	test/build/min.test.ts
#	test/integration/render/tests/projection/globe/raster-planet/expected-flaky.png
#	test/integration/render/tests/projection/globe/raster-warped/expected-win-flaky4.png
@HarelM
Copy link
Collaborator

HarelM commented Aug 27, 2024

Let's remember to update the changelog with the breaking change that was done as part of this PR before we merge this to main and create version 5. It is tracked as part of #3834 in general.

@HarelM HarelM merged commit b859df9 into maplibre:globe Aug 27, 2024
13 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants