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

Improve hillshade layers not using raster-dem sources error message #353

Merged

Conversation

ibesora
Copy link
Contributor

@ibesora ibesora commented Sep 27, 2023

This PR improves the errors around adding hillshade layers that don't use a raster-dem source.

Before this PR, adding a hillshade layer with a raster source said layer \"test\" requires a vector source" which is not right.
With this PR, the same use case results in the following error: layer \"test\" requires a raster-dem source.
It also adds a couple of tests to check that and an extra one that tests a condition that was not met before (using a raster-dem source type on layers that are not hillshade)

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (58eb347) 77.99% compared to head (58c417d) 78.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   77.99%   78.02%   +0.03%     
==========================================
  Files         101      101              
  Lines        4140     4142       +2     
  Branches     1183     1184       +1     
==========================================
+ Hits         3229     3232       +3     
+ Misses        911      910       -1     
Files Coverage Δ
src/validate/validate_layer.ts 100.00% <100.00%> (+1.47%) ⬆️

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

@HarelM
Copy link
Member

HarelM commented Sep 27, 2023

Let's add this to 19.3.2 as well...

@HarelM HarelM merged commit fe9ba79 into maplibre:main Sep 27, 2023
6 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.

None yet

3 participants