-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add legend package to generate legends from WMS and WMTS layers #19
Conversation
713b6e0
to
7ebe068
Compare
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.
Looking great, thanks! I just made a comment on the doc and a suggestion on the return value of the createLegendFromLayer
function, address as you see fit and then feel free to merge!
packages/legend/README.md
Outdated
}); | ||
``` | ||
|
||
## API Documentation |
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.
The API documentation should be written in the code as jsdoc annotations; there's an automatic website generated from it :) you can try it using npm run docs:dev
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.
Should I remove the API documentation section from here? I kept it because it might be visible on the package page on npmjs.com
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.
Hmm, I think you can remove it and put a link to the online documentation. Otherwise we'll have to maintain it manually and it might become misleading/wrong in the future.
1685ec9
to
01b2a89
Compare
Good job 🙂 |
Description
This pull request introduces a new package
@geospatial-sdk/legend
that provides functionality for generating map layer legends. The changes include adding the core functionality, tests, configuration files, and necessary exports.Key changes include:
Core Functionality:
createLegendFromLayer
function to generate legends for WMS and WMTS layers infrom-layer.ts
. This includes handling different configurations and error cases.Testing:
createLegendFromLayer
infrom-layer.test.ts
to ensure correct functionality and error handling.