Skip to content

Allow treating area as node #6

@mrmaxguns

Description

@mrmaxguns

It's important to allow areas the ability to be treated as nodes in order for them to have things like icons and labels. This should be done in the <layers> portion of the stylesheet because it's a display option.

Proposal

<selectors>
  <way id="hospital">
    <or>
      <tag k="amenity" v="hospital"/>
      <tag k="amenity" v="clinic"/>
      <tag k="amenity" v="doctors"/>
    </or>
  </way>
</selectors>
<layers>
  <waytopoint id="hospital">
    <nodeshape vertices="8" radius="0.8mm" fill="#ffb3b3" stroke="#cc6666" thickness="0.2"/>
    <nodeshape vertices="3" radius="0.5mm" fill="#ffffff" thickness="0.2"/>
  </waytopoint>
</layers>
  • A new layer called waytopoint that applies to Way geometry
  • One or more Node layers
  • Internally, the waytopoint layer uses an algorithm to find a suitable node for the given way and then feeds it to the inner layers
  • Layers are rendered in order from first to last, as is the case normally

Implementation

Mapbox polylabel is appropriate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions