Comments (22)
Looks like if value can't be parsed there is some fallback instead of a crash, and this fallback works better than the currently used value.
Anyway, (20 + feature.scalerank).toString()
works, and strings are interpreted correctly (tested with place-labels)
from streetcomplete-mapstyle.
The problem is
removing the
20 +
makes the flicker go away.Using other values instead of
20
changes label placement a little, but so far I always found at least some flickering for the values I tested.Even when using
0
instead of 20
.from streetcomplete-mapstyle.
I am pretty sure that I have seen this problem in 45.1 and earlier, also for water labels
from streetcomplete-mapstyle.
Maybe, but I just tried older version to see when it started, and I haven't seen it in a short test using 45.1 older versions. So even if it was there, it's much more frequent in newer versions.
from streetcomplete-mapstyle.
In the end, isn't this rather an issue of tangram rather than the mapstyle?
from streetcomplete-mapstyle.
Maybe it is, but at the same time it was probably triggered by a change in map style (didn't look up what exactly could have caused it) and I didn't notice any issues / bad placement of water labels previously.
from streetcomplete-mapstyle.
- possibly related: streetcomplete/StreetComplete#4350
from streetcomplete-mapstyle.
Is "priority" maybe supposed to be a string in the end?
from streetcomplete-mapstyle.
At least for place-labels
an integer works fine for the correct order...
from streetcomplete-mapstyle.
So weird... what is the pattern there...? Maybe the missing semicolon at the end is the issue?
from streetcomplete-mapstyle.
I think I already tried that, without effect
from streetcomplete-mapstyle.
Is "priority" maybe supposed to be a string in the end?
... but maybe still it somwhow is?
priority: function() { return ${20 + feature.scalerank} }
works (though I'm not even sure whether this actually results in a string as I didn't check how yaml parsing works...)
I didn't find any difference in label placement compared to priority: function() { return feature.scalerank }
though
from streetcomplete-mapstyle.
Uh, what does function() { return ${20 + feature.scalerank} }
in Javascript even do? (If this is a string placeholder like in kotlin, shouldn't there be quotes around that?)
from streetcomplete-mapstyle.
So this is javascript? I have no idea how yaml files are parsed and just did more or less "random" things.
from streetcomplete-mapstyle.
from streetcomplete-mapstyle.
I wonder why there is no error message in SC / Tangram... and why this actually works better than the current version (for flickering and not hiding pins)
from streetcomplete-mapstyle.
why this actually works better than the current version (for flickering and not hiding pins)
Maybe it is broken and therefore is not triggering broken functionality in Tangram? With two bugs negating each other?
from streetcomplete-mapstyle.
Anyway, (20 + feature.scalerank).toString() works, and strings are interpreted correctly (tested with place-labels)
So, this is the fix to make it all work?
from streetcomplete-mapstyle.
With this change I am unable to reproduce both the flickering labels and the pin disappearing on the house linked in streetcomplete/StreetComplete#4522 (comment)
from streetcomplete-mapstyle.
Do you plan to create a PR for this?
from streetcomplete-mapstyle.
I still don't have much time (and currently not even working Android Studio), but that's only a simple change to be done online...
Will do it tomorrow, of you can just commit it if you want it quicker.
from streetcomplete-mapstyle.
This should be fixed with #142
from streetcomplete-mapstyle.
Related Issues (20)
- Render peaks HOT 5
- Render public transport platforms HOT 7
- Translated names are displayed in the foreign language (English) HOT 5
- Maybe railways in dark mode are too prominent HOT 2
- Render natural=grassland like landuse=grass (impossible, missing in Jawg) HOT 8
- StreetComplete Map Style Editor seems to be not working HOT 1
- Town label blocked by village label HOT 5
- footway tunnels have no special transparentish rendering, unlike roads HOT 2
- Plazas are not rendered correctly HOT 3
- Display "Track Roads" as different from normal roads HOT 7
- confusing style for highway=pedestrian HOT 13
- Don't render building heights when building:part heights in a polygon are already rendered HOT 1
- Render building polygon when number and street is not set HOT 6
- `trunk_link` is disappeared
- City walls obscure ways HOT 5
- Roundabouts not recognised as oneway HOT 6
- Train platforms as multipolygons are not rendered correctly HOT 4
- One-way road showing an arrow in the wrong direction HOT 10
- Add to Taginfo Projects HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streetcomplete-mapstyle.