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.

Carto parser fails with conditionals in autostyling

See original GitHub issue

When set autostyling, the maps api fails in some cases like this example:

#layer {
 [mapnik-geometry-type=point] {
    marker-fill: #FF6600;
    marker-opacity: 1;
    marker-width: 12;
    marker-line-color: white;
    marker-line-width: 3;
    marker-line-opacity: 0.9;
    marker-placement: point;
    marker-type: ellipse;marker-allow-overlap: true;
  }
 }

With the autostyling it is changed to this:

#layer { polygon-fill: ramp([type], (#7F3C8D, #11A579), ('FRANCE', 'ESPAÑA')); 

 [mapnik-geometry-type=point] {
    marker-opacity: 1;
    marker-width: 12;
    marker-line-color: white;
    marker-line-width: 3;
    marker-line-opacity: 0.9;
    marker-placement: point;
    marker-type: ellipse;marker-allow-overlap: true;
  }
 }

If you remove the conditional [] in the initial styles it seems to work and if you copy and rewrite the variable with the devtools it works too with exactly the same string.

Could it be an encoding error?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
donflopezcommented, Oct 13, 2016

It is an encoding error, with the ASCII character 160.

It seems to be in the whole project, there is 99 in @CartoDB/cartodb.

We can avoid it, but it is very common… you can put it with alt + space

0reactions
donflopezcommented, Oct 13, 2016

@saleiva but the error with the ‘#’ char is in a field of the table, this is a CartoCSS problem.

I can’t reproduce the #463 issue as I explained there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog | TileMill - GitHub Pages
TileMill - autostyle now works against active stylesheet. TileMill - fixed crash when using ... Carto - Fixes parsing of comments in between...
Read more >
cartodb/NEWS.md at master - GitHub
Display notifications about the new CARTO platform release 16352; Upgrade to deck.gl ... Fixed a problem with autostyle when styles has aggregation (#8648) ......
Read more >
Untitled
Ipad air ram problem, Restaurant saint laurent 22, Akai gx-r99 ebay, ... Knicks city dancers facebook, Frank vandenbroucke kul, Autostyle cars miami, ...
Read more >
Untitled
Heci error during mebx, Remboursement de l'avance sur salaire. ... Accidente alumnos uabc, Rephrasing conditionals 2 bachillerato, Nume set review?
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