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

Add missing layer in map example for @turf/line-split docs #2724

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

luc-tielen
Copy link

  • Is this a bug fix, new functionality, or a breaking change?
  • Have read and followed the steps for preparing a pull request.

Very simple PR, I noticed in the docs a layer was missing for line-split.
(You can't see the actual "split" result, see https://turfjs.org/docs/api/lineSplit#examples.)

@smallsaucepan
Copy link
Member

Thanks for fixing this @luc-tielen. Could I please make a small request? To go above and beyond would you mind making the split line multi coloured? That will make the result easier to visualise.

If you expand the addToMap part to include the extra lines below, that should produce a map like the one shown.

 * //addToMap
 * var addToMap = [line, splitter, split]
 *
 * split.features[0].properties.stroke = "red";
 * split.features[1].properties.stroke = "blue";

Screenshot 2024-10-16 at 2 15 15 PM

Let us know when that is done we can merge this in!

@smallsaucepan
Copy link
Member

Please also run pnpm run docs to regenerate the README.md and commit those changes too.

@luc-tielen
Copy link
Author

Thanks @smallsaucepan for the suggestion, I didn't know this was possible.
I'm only "passing by" and noticed this in the docs using this (great!) library at work, so I didn't realize it was more than a simple doc change.

Let me know if I need to do anything else. Thanks!

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.

3 participants