Show boat rentals on the chart - #75
Merged
Merged
Conversation
amenity=boat_rental is charted as a small craft facility, alongside boat storage, boatyards and the rest. Somewhere to hire a boat is the kind of thing a visiting crew looks for, and until now the chart said nothing about it. The badge carries its own name rather than leaving it to seamark-label. The two used to be separate symbol layers over the same point, and since labels place last they always won the collision — so a facility in a crowded harbour could show its name with no badge beside it. As one symbol, text-optional drops the name and keeps the icon instead, which is how harbours and landmarks already work. Facility badges also taper faster below z17 and let an unnamed one yield first when two collide, so a marina's worth of them recedes into the chart rather than tiling over it.
There was a problem hiding this comment.
Pull request overview
This PR adds support for charting amenity=boat_rental as a small_craft_facility POI badge, and adjusts small-craft facility symbol/label placement so the badge keeps priority while its name can drop when space is tight.
Changes:
- Add
amenity=boat_rentalextraction and taginfo metadata. - Add a new POI badge sprite mapping and wire the new facility category to an icon in the structures style layer.
- Move small-craft facility names from
seamark-labelinto the facility badge symbol layer, and retune facility badge sizing/placement behavior in dense areas.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| worker/src/taginfo.ts | Documents the new amenity=boat_rental tag as charted content. |
| style/sprites/poi-icons.json | Adds the poi-boat-rental badge glyph mapping for sprite generation. |
| style/layers/structures.ts | Renders boat rentals as small-craft facility badges and unifies facility icon+text into one symbol layer, with updated sizing/placement logic. |
| style/layers/labels.ts | Excludes small_craft_facility from the generic point-name label layer since facility names now ride with the badge layer. |
| src/main/java/Seamark.java | Extracts amenity=boat_rental into seamark tiles as type=small_craft_facility, category=boat_rental. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The sort key asked whether a facility had a name, but a fuel dock labels with the grades it sells instead. An unnamed dock tagged fuel:diesel=yes printed "D" and was still demoted as though it had nothing to say, which is the opposite of why fuel docks show grades at all. Both the sort key and the text now read one hasLabel condition, so "something to print" is defined once. The facility filters get a test as well: a facility point draws in small-craft-facilities and not in seamark-label, which is the whole point of moving the name into the badge layer and easy to undo by accident.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
amenity=boat_rentalis now charted as a small craft facility, alongside boat storage, boatyards and the rest. Somewhere to hire a boat is the sort of thing a visiting crew goes looking for, and the chart had nothing to say about it.Wiring up the tag turned up a placement problem that affects every facility, not just rentals.
The badge and its name
A facility's badge and its name were two symbol layers over the same point:
small-craft-facilitiesinstructures.tsandseamark-labelinlabels.ts. Labels draw last, and MapLibre places symbols in reverse draw order, so the name always won the collision. A facility in a busy harbour could print its name with no badge beside it, which is backwards. The Advantaged Yacht Charters in Miami Beach did exactly that.The name now rides in the badge layer, so the two are one symbol.
text-optionalthen drops the name and keeps the icon when space runs out. Harbours and landmarks already work this way, andsmall_craft_facilityjoins them inseamark-label's exclusion list.A fuel dock still prints its grades rather than its name. Which ones it sells decides whether it's worth the detour, and the icon already says "fuel".
Density
Badges run from 0.55 at z14 to full size at z17, rather than starting at 0.8, so a marina's worth of them recedes into the chart instead of tiling over it. The anchor offsets move with the icon: the existing derivation holds about 7.5px between badge edge and glyph, which comes out at 1.63em against the smaller badge.
An unnamed badge yields first when two collide. That is the same call
harbourDrawalready makes for harbours in the pipeline.Checking it
Built Florida and looked at rentals in Miami Beach, Fort Lauderdale and Hollywood, including the crowded case that surfaced the collision.
The matching
SeamarkPrioritychange is deliberately absent. TheFACILITYfamily has noBUDGETentry, sowithinBudgetreturns unlimited for facilities and the badge layer never applies it, which would leave a rank modifier as dead code. Whether facilities should have a per-cell allowance at all is worth deciding on its own.