umap icon indicating copy to clipboard operation
umap copied to clipboard

OSM objects without a name default to using the name of the layer in popups/tooltips

Open Dr-Mx opened this issue 9 months ago • 1 comments

Describe the bug I am using remote data via Overpass. If an OSM object doesn't have a name=* key, {name} fields in popups/tooltips use the layer name or label key instead.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://umap.openstreetmap.fr/en/map/untitled-map_1177790#19/50.84334/0.46898
  2. Objects without names have popups/tooltips with the name of the layer.

Expected behaviour Would be nice to separate the name fields from OSM, that way we can use variables like {name|addr:housename}.

Thanks for your time!

Dr-Mx avatar Feb 13 '25 22:02 Dr-Mx

Ah, yes, good catch! This is a special case for name property.

As a work around, you can achieve the wanted behaviour by setting the fallback on the layer label's key:

Image

(I changed it on your map, so to give you an example.)

I'll see how to make it work even like you've done it, i.e. in the template it self.

yohanboniface avatar Apr 16 '25 14:04 yohanboniface