Skip to content

Commit

Permalink
Show residents parking when exists zone tag (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlant committed Mar 18, 2023
1 parent 5ab5658 commit e02c231
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parking/access-condition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export function getConditions(tags: OsmTags, side?: string) {
if (accessValue)
conditions.default = mapAccessValue(tags, accessValue, side)

const zoneValue = getValue(tags, 'zone', side)
if (zoneValue)
conditions.default = 'residents'

const openingHoursValue = getValue(tags, 'opening_hours', side)
if (openingHoursValue) {
conditions.conditionalValues!.push({
Expand Down

1 comment on commit e02c231

@kaneap
Copy link

@kaneap kaneap commented on e02c231 Mar 20, 2023

Choose a reason for hiding this comment

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

I believe it should only render pink when combined with access=private.
For example, I'd expect

  • parking:both = lane
  • parking:both:fee = yes
  • parking:both:orientation = perpendicular
  • parking:both:zone = 42
    to render in paid parking blue, as anyone can park there for a fee. Example and In the viewer

It also appears to render pink regardless of the time of day for part-time resident parking:

  • parking:right = lane
  • parking:right:access:conditional = private @ 16:00-09:00
  • parking:right:fee = no
  • parking:right:orientation = parallel
  • parking:right:zone = W
    Example and In the viewer

Please sign in to comment.