Skip to content

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

Merged
smallsaucepan merged 7 commits intoTurfjs:masterfrom
luc-tielen:master
May 24, 2025
Merged

Added missing layer in map example for @turf/line-split docs#2724
smallsaucepan merged 7 commits intoTurfjs:masterfrom
luc-tielen:master

Conversation

@luc-tielen
Copy link
Contributor

  • 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
Contributor 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!

@smallsaucepan smallsaucepan changed the title Add missing layer in map example for @turf/line-split docs Added missing layer in map example for @turf/line-split docs May 24, 2025
@smallsaucepan
Copy link
Member

Thanks for doing this @luc-tielen. Apologies for taking a while to get it merged.

@smallsaucepan smallsaucepan merged commit 519d66e into Turfjs:master May 24, 2025
3 checks passed
@luc-tielen
Copy link
Contributor Author

@smallsaucepan No problem! Nice to see it got merged in the end. 😃

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