Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

smarter label order #117

Merged
merged 1 commit into from
Dec 2, 2021
Merged

smarter label order #117

merged 1 commit into from
Dec 2, 2021

Conversation

matkoniecz
Copy link
Member

@matkoniecz matkoniecz commented Nov 30, 2021

previously village and town could have the same scalerank, with unimportant label obscuring more important

also, water label could obscure town label (at least theoretically)

fixes #113

The open questions:

is it necessary to do the same for other map branches? Probably not worth time for investigating is similar poor ordering present also there

it is possible to apply the very similar solution for having different label sizes (and actually I used it for debugging)

I plan on merging it after one extra testing round (when I am less sleepy) and after giving people time for checking it, but I am quite certain about this

note: to make testing easier label size can be bumped, for example with

                font:
                    family: global.text_font_family
                    fill: global.text_fill_color
                    size: |
                      function() {
                          if(feature.type == "city") {
                              return "30px";
                          }
                          if(feature.type == "town") {
                              return "25px";
                          }
                          if(feature.type == "village") {
                              return "20px";
                          }
                          if(feature.type == "hamlet") {
                              return "15px";
                          }
                          if(feature.type == "suburb") {
                              return "10px";
                          }
                          if(feature.type == "neighbourhood") {
                              return "5px";
                          }
                          return "100px";
                      }
                    stroke: global.text_places_stroke

previously village and town could have the same scalerank, with unimportant label obscuring more important

also, water label could obscure town label (at least theorethically)

fixes streetcomplete#113
@matkoniecz matkoniecz merged commit ec99ee5 into streetcomplete:jawg Dec 2, 2021
@matkoniecz matkoniecz deleted the priority branch December 2, 2021 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Town label blocked by village label
1 participant