Commit graph

12 commits

Author SHA1 Message Date
Midgard
122acf8674 Fix issues with camera rotation
This commit fixes at least these issues that I was aware of:
* Cardinal directions (e.g. NE) were not recognized.
* The camera icon did not rotatie when direction=* was used instead of
  camera:direction, but the blue direction visualizer did.

Pietervdvn said he would have liked to convert the code for direction
normalizing to calculatedTags in a JSON file (as documented in
Docs/CalculatedTags.md), but when he saw the oneliners I had to produce
in response, I was allowed to keep it in SimpleMetaTagger.ts for now.
For your amusement, the oneliners are included below.

    "calculatedTags": [
      "_direction:numerical=(dir => dir === undefined ? undefined : ({N: 0, NNE: 22.5, NE: 45, ENE: 67.5, E: 90, ESE: 112.5, SE: 135, SSE: 157.5, S: 180, SSW: 202.5, SW: 225, WSW: 247.5, W: 270, WNW: 292.5, NW: 315, NNW: 337.5}[dir] ?? (isNaN(parseFloat(dir)) ? undefined : ((parseFloat(dir) % 360 + 360) % 360)))))(feat.properties['camera:direction'] ?? feat.properties.direction)",
      "_direction:leftright=feat.properties['_direction:numerical'] === undefined ? undefined : (feat.properties['_direction:numerical'] <= 180 ? 'right' : 'left')"
    ]
2021-04-28 17:21:06 +02:00
pietervdvn
2900bdc784 Documentation improvement and warning cleanup 2021-04-25 16:01:46 +02:00
pietervdvn
54f01ba554 Add metadata to query, move metatagging of metadata to metatagger, tweaks to the generate caching so that the cached data becomes more stable (and is GIT-friendlier) 2021-04-25 13:25:03 +02:00
pietervdvn
0dec1d0f75 Refactoring of metatagging and extrafunctions to splice out the relation memberships, add calculatedTags and metatags into cache 2021-04-22 13:30:00 +02:00
pietervdvn
c6b4ba43fb Add feature which loads the selected element from overpass to update the tags to the latest version 2021-04-21 01:26:13 +02:00
pietervdvn
12afdcab75 Add better relation support 2021-04-18 14:24:30 +02:00
pietervdvn
7b47af8978 Add license info, fix non-updating values after reopening popups 2021-04-17 23:36:46 +02:00
pietervdvn
bec1998a6d Fix incorrect imports due to refactoring 2021-03-29 02:04:42 +02:00
pietervdvn
ad406b5550 Remove legacy: the minOverlapPercentage can now be built with a calculated tag and isShown 2021-03-26 03:24:58 +01:00
pietervdvn
1b1ec9f15d Add switch to hide certain features, cleanup of code 2021-03-25 15:19:44 +01:00
pietervdvn
0491b52642 Add doc generation 2021-03-24 02:01:04 +01:00
pietervdvn
f124d9ded7 Add custom javascript snippets to calculate tags 2021-03-24 01:25:57 +01:00