Skip to content

Show boat rentals on the chart - #75

Merged
bkeepers merged 2 commits into
mainfrom
add-boat-rental
Aug 18, 2026
Merged

Show boat rentals on the chart#75
bkeepers merged 2 commits into
mainfrom
add-boat-rental

Conversation

@bkeepers

Copy link
Copy Markdown
Member

amenity=boat_rental is 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-facilities in structures.ts and seamark-label in labels.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-optional then drops the name and keeps the icon when space runs out. Harbours and landmarks already work this way, and small_craft_facility joins them in seamark-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 harbourDraw already 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 SeamarkPriority change is deliberately absent. The FACILITY family has no BUDGET entry, so withinBudget returns 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.

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.
Copilot AI lite review requested due to automatic review settings August 17, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_rental extraction 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-label into 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.

Comment thread style/layers/structures.ts Outdated
Comment thread style/layers/labels.ts
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.
@bkeepers
bkeepers merged commit c14c6ee into main Aug 18, 2026
3 checks passed
@bkeepers
bkeepers deleted the add-boat-rental branch August 18, 2026 12:34
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.

2 participants