GithubHelp home page GithubHelp logo

Comments (22)

Helium314 avatar Helium314 commented on June 21, 2024 3

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.

Helium314 avatar Helium314 commented on June 21, 2024 1

The problem is

priority: function() { return 20 + feature.scalerank }

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.

matkoniecz avatar matkoniecz commented on June 21, 2024

I am pretty sure that I have seen this problem in 45.1 and earlier, also for water labels

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

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.

westnordost avatar westnordost commented on June 21, 2024

In the end, isn't this rather an issue of tangram rather than the mapstyle?

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

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.

mnalis avatar mnalis commented on June 21, 2024

from streetcomplete-mapstyle.

westnordost avatar westnordost commented on June 21, 2024

Is "priority" maybe supposed to be a string in the end?

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

At least for place-labels an integer works fine for the correct order...

from streetcomplete-mapstyle.

westnordost avatar westnordost commented on June 21, 2024

So weird... what is the pattern there...? Maybe the missing semicolon at the end is the issue?

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

I think I already tried that, without effect

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

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.

westnordost avatar westnordost commented on June 21, 2024

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.

Helium314 avatar Helium314 commented on June 21, 2024

So this is javascript? I have no idea how yaml files are parsed and just did more or less "random" things.

from streetcomplete-mapstyle.

westnordost avatar westnordost commented on June 21, 2024

Screenshot 2022-11-21 at 21 52 23

(In Firefox console)

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

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.

matkoniecz avatar matkoniecz commented on June 21, 2024

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.

westnordost avatar westnordost commented on June 21, 2024

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.

Helium314 avatar Helium314 commented on June 21, 2024

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.

westnordost avatar westnordost commented on June 21, 2024

Do you plan to create a PR for this?

from streetcomplete-mapstyle.

Helium314 avatar Helium314 commented on June 21, 2024

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.

Helium314 avatar Helium314 commented on June 21, 2024

This should be fixed with #142

from streetcomplete-mapstyle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.