Also
- use field inheritance to simplify presets
- rename multipurpose to "Golf Cartpath / Service Road"
(I think users would understand this better)
- add `maxspeed` to "Golf Cartpath / Service Road"
(closes#5872)
This commit also hardens the 'key=value' splitting behavior to actually
check the split result length and avoid overwriting a readonly key
(re: #5024)
I've converted the improveOSM errors to use this new generic QA error
structure which should allow for more general code to be used in
behaviour and UI.
Sidebar preview is currently broken, but will be fixed shortly.
Javascript is not my usual domain so still getting used to how scope
works and working with callbacks. Believe this code is now written as
intended.
As a bonus a response status to the error update request which isn't the
expected 200 now returns before visibly removing the error and adding it
to the closed cache.
Potential for multiple missing turn restrictions on one node and I've
also seen a case of missing one-way along the same stretch of road in
opposite directions!
Missing geometry is tile based so can't really be coincident, but
doesn't hurt to check in case they happen to land on a one-way or turn
restriction.
The direction of travel in the description was misleading as the way
segment wasn't necessary linear and so the direction could change as you
travel along the way. This is more explicit as it specifies the detected
start/end nodes (also useful to show that it's not the whole way that
might be one-way).
The position is now taken as the central node in the `feature.points`
list (or the average of the central two when there are an even number of
points).
As per my last commit, this icon differentiates errors from points and
still allows us to specifiy icons for errors to differentiate them amongst
eachother.
I learned quite a bit about SVGs and using them in HTML while
implementing this 😝Had some issues getting the icon to center in the
header so resorted to using a flexbox instead of absolute positioning
being used elsewhere.
This allows more diverse representation of the error subject at a glance
than relying on colour alone.
However, it would be good to have a generic error icon that can contain
icons which is differentiated from the point icon for clarity.
Sidebar header currently still uses the bolt icon until I figure out
how to deal with that. Also the font awesome icons don't seem to work,
perhaps there's additional code needed for those that I've missed.
This could result in error updates getting aborted when new errors are
loaded as their individual ids are never going to match tile IDs (see
`abortUnwantedRequests` function).