Skip to content

Conversation

@tyrasd
Copy link
Member

@tyrasd tyrasd commented Apr 17, 2025

Various improvements regarding addresses:

  • add feature type "address points" for addresses mapped as nodes, allows to hide these, e.g. in regions with extremely high density of such nodes. fixes extreme high density of address nodes prevents editing of other POIs #10315
  • render the housenumber or housename of address points as dedicated points with a "number plate" outline (compared to the "pin" outline for regular POIs)
  • render the housenumber or housename of buildings (and other areas) like the name (when there is no name)

Remaining todos / open questions:

  • add to changelog / release notes
  • should in case when there are both addr:housenumber and addr:housename, also both be rendered?
  • fully document all changes. There are some minor changes e.g. in the labeling code or the address field input handling, but there is one especially "deep" change in history.js: it should be fine (i.e. the intended way this was always supposed to work), but needs some double-checking for potential side-effects
    • fix move operation which is now glitchy probably because of the above mentioned change to the overwrite method
  • fix bbox of touch targets (g.layer-touch > rect)

Below are a few example screenshots for different situations of mapped addresses:

  1. addr:housename tagged as nodes:
  2. addr:housename tagged on buildings:
  3. mixture of address points addresses tagged on buildings with relatively long housenumbers
  4. mostly addresses on buildings
  5. housenumbers on building vertices (not tagged as entrance)
  6. housenumbers on building vertices, tagged as entrance
  7. addresses as separate points (often more than one housenumber per house)

* points with a dedicated marker
* text inside of areas
@tyrasd tyrasd added usability An issue with ease-of-use or design map-renderer An issue with how things are rendered in the map labels Apr 17, 2025
@tyrasd tyrasd marked this pull request as draft April 17, 2025 16:27
@tordans
Copy link
Collaborator

tordans commented Apr 19, 2025

render the housenumber or housename of address points as dedicated points with a "number plate" outline (compared to the "pin" outline for regular POIs)

I am not sure this is an improvement.
Right now, we have something that is easy to understand: Select the Pin-Draw-Tool => Get a Pin Icon and the other way around: See a Pin Icon => This is a node object.
This will be the first time(?) that a node does not look like a note.
We loose the pointy part of the node that tells me where it is located. An area would be located in the center more likely, not below the pin.

==> I think we should look for a way to have this still look like a pin, even though the content of the pin is now longer (the ref/number)

Making this new feature is less of a change IMO especially since the address pin never had a distinguished icon (pin content)

render the housenumber or housename of buildings (and other areas) like the name (when there is no name)

This is this part, right? image

This looks like a rendering but to me TBH.
We need to make those look the same as the number pins from my comment above so users understand they are both address notes. But they need to be short.

One workaround could be to cut all of those new address pins after 4 chars and ellipse "…" them and on mouseover they show their full number, name, …
Does not have to be mouseover TBH, clicking would be fine at well.

@tyrasd
Copy link
Member Author

tyrasd commented Apr 21, 2025

render the housenumber or housename of buildings (and other areas) like the name (when there is no name)

actually, what I meant was when addr:* is on an area (screenshots 2, 4): then, there will be a label inside of the area (where a name would be rendered if there is one). This has the downside that the housenumber is only shown when there is no name tag: For example, when there is building=yes + tourism=hotel + name=XY Inn + addr:housenumber=123, then the label would only show XY Inn. This problem is similar to the case when an address has both addr:housename and addr:housenumber. I've added it to the open questions list above, but maybe these two issues could best be addressed separately in a follow-up PR?


One workaround could be to cut all of those new address pins after 4 chars and ellipse "…" them and on mouseover they show their full number, name, …

Good idea to limit the maximum length with an ellipse. It looks like this now:


This will be the first time(?) that a node does not look like a note.

Not quite: aside from vertex-nodes, also nodes with a direction tag (e.g. typically found on viewpoints, traffic signs, etc.) are already rendered as circles (plus viewport cone):

The reason to deviate from the "POI" symbol for address nodes was to make them more space-efficient, as the pin shape is already quite spacious, and the rendering of the labels next to the pin does not help either. This is fine for regular points of interests (e.g. a shop, school, landmark, etc.), as it allows to show an icon in the pin and can handle potentially long labels.

look for a way to have this still look like a pin

I played around a little bit with some alternative shapes: making them more pin-shaped by adding a little triangle at the bottom makes them look a bit like thought bubbles, which is kinda cute. But it also adds quite a lot of visual noise for little benefit: addresses are typically not that "pin-pointable" in practice, as they by definition stand in place for a building or similar area.1

Footnotes

  1. Yes, sometimes addresses stand for a particular building entrance, but for those we already use the not-so-much-pinpointable rendering of vertex circles anyway.

tyrasd added 5 commits April 21, 2025 15:29
as the current graph has now the most recent version of the modified entities, each individual change only needs to take into account the delta of the mouse movement between the current position and the previous one (instead of the original mouse position when the operation was started)
consider some additional tags as "not interesting"/non-POI-like:
* check_date/fixme/note/note:*/survey:* — mapping related tags
* layer/level/level:ref — can be considered attributes of the address
* ref:* – often used to indicate a source ID on imported data
@tyrasd tyrasd added this to the v3.35 milestone Apr 23, 2025
@tyrasd tyrasd marked this pull request as ready for review April 23, 2025 10:32
@tordans
Copy link
Collaborator

tordans commented Apr 23, 2025

Good idea to limit the maximum length with an ellipse. It looks like this now:

Looks good and a lot better to me. Does it have mouseover or do I have to click to see the full name?

Not quite: aside from vertex-nodes, also nodes with a direction tag (e.g. typically found on viewpoints, traffic signs, etc.) are already rendered as circles (plus viewport cone)

Thanks for the reminder, I see your point!

I played around a little bit with some alternative shapes: making them more pin-shaped by adding a little triangle at the bottom makes them look a bit like thought bubbles, which is kinda cute. But it also adds quite a lot of visual noise for little benefit: addresses are typically not that "pin-pointable" in practice, as they by definition stand in place for a building or similar area.

I like this design a lot.

I could see us using it for all pins. It would given them a fresh look and make them more space efficient. It could even work for the direction cone variant, reducing the number of different designs.

@tyrasd
Copy link
Member Author

tyrasd commented Apr 23, 2025

No, mouseover did not work in my tests (probably due to how the mouse events are handled: there are separate "touch targets" that are independent from the labels). but as that would not be really much faster than clicking on the node to see the value, I think it's acceptable.

I could see us using it for all pins.

🤔 could be worth a try…

@tyrasd tyrasd merged commit 9b7a988 into develop May 12, 2025
4 checks passed
@tordans
Copy link
Collaborator

tordans commented May 22, 2025

@tyrasd I assumed this PR is the source for those rounded-square shapes in https://pr-1555--ideditor-presets-preview.netlify.app/id/dist/#locale=en&map=19.60/14.65605/121.06291&disable_features=boundaries&background=Bing&id=w98724280 ?

image

I think those should not receive the new layout but stay undefined pins instead.

tyrasd added a commit that referenced this pull request Jul 16, 2025
fixes a regression in #10970:
* transitionable actions use `history`'s `_overwrite` under the hood, which expects the supplied graph to be the one of the original state when the action was started.
* the original approach in #10970 did change this method to instead supply the graph of the previous step of the transition or the previous call to `.overwrite`, such that objects get a new `v` version such that they are properly rerendered if necessary (e.g. in case a node changes from being an address node to a full POI node, or vice versa)
* the fix was to restore the `overwrite` implementation (to make transitioned action behave correctly), and elsewhere use `history.replace` where applicable to get proper entity updates
tyrasd added a commit that referenced this pull request Jul 16, 2025
fixes a regression in #10970:
* transitionable actions use `history`'s `_overwrite` under the hood, which expects the supplied graph to be the one of the original state when the action was started.
* the original approach in #10970 did change this method to instead supply the graph of the previous step of the transition or the previous call to `.overwrite`, such that objects get a new `v` version such that they are properly rerendered if necessary (e.g. in case a node changes from being an address node to a full POI node, or vice versa)
* the fix was to restore the `overwrite` implementation (to make transitioned action behave correctly), and elsewhere use `history.replace` where applicable to get proper entity updates
@k-yle k-yle mentioned this pull request Jul 30, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

map-renderer An issue with how things are rendered in the map usability An issue with ease-of-use or design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extreme high density of address nodes prevents editing of other POIs

2 participants