question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Complex marker logic

See original GitHub issue

I have a question about a relatively complex marker logic situation.

You have several (small amount) types of features on a table. You want to represent each one of these with a particular icon.

This is solved with a symbol ramp:

symbol: ramp(buckets($category, ['primary', 'secondary']), [image(primaryUrl), image(secondaryUrl)], image(fallback))

So, we are mapping the icon on one dimension, the $category.

Imagine now we want to highlight a particular feature, by changing its marker. Maybe a different version of the marker associated with its category.

How would you approach this?

I thought of a couple of things

Approach 1 - If expression

Not knowing anything about internals. Would an if operator be feasible?

if(condition, expression_for_true, expression_for_false)

The condition could be $cartodb_id == ${selectedId} The first expression could be the ramp for highlighted markers based on category The second expression could be the ramp for non-highlighted markers based on category.

This approach reminds me of doing spreadsheets 😬

Approach 2 - Composed variables

What if we could create interpolated like this:

$category_${selectedId == $cartodb_id}

Then the ramp would map: primary_1, primary_0, secondary_1, secondary_0 to primaryUriSelected, primaryUri, secondaryUriSelected, secondaryUri

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
elenatorrocommented, May 10, 2019

Hello @pedrohb88, let’s see if we can prioritize these issues related with the blendTo method and the texture units used. Thanks!

1reaction
rochoacommented, Jan 9, 2019

@rjimenezda, I think what’s missing here is no longer how to solve the initial problem but the fact that we have some errors regarding freeing resources at WebGL side. If you are OK, I’m gonna close this issue a create a new one to address the issue with the out of range textures problem:

WebGL: INVALID_ENUM: activeTexture: texture unit out of range
[.WebGL-0x7fe4fc860e00]GL ERROR :GL_INVALID_VALUE : glUniform1i: texture unit out of range
Read more comments on GitHub >

github_iconTop Results From Across the Web

Logic Pro markers overview - Apple Support
In Logic Pro, you can use markers to organize a project, select part of a project, and to identify locator positions.
Read more >
How to Use Markers and Edit Your Arrangement in Logic Pro
Markers in Logic Pro are labels to help organize your tracks. They are great for creating song sections for your tracks or even...
Read more >
Using Logic's Global Markers
Markers have always been available in Logic, but the new Global Tracks ... Giving Markers different colours can really speed up navigation in...
Read more >
the Ultimate Project Navigation Technique in Logic Pro 9
Navigating complex, or even simple, projects in Logic can be a pain if you ... In my humble opinion, markers are the single...
Read more >
Map markers clustering using Google Maps Utils - datarockets
During the development of one of the apps in 2016, I had to solve a pretty complex task. The app needed to demonstrate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found