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.

line-offset makes the tile borders visible

See original GitHub issue

Context

Trying to style a layer using line-offset and the tiles borders become visible as a side effect

Steps to Reproduce

  1. Create a map from a polygon dataset or from scratch with an empty layer, and then draw a polygon by hand
  2. Style the layer with an extra border with Npx offset as
#layer {
  polygon-fill: #374c70;
  polygon-opacity: 0;
  line-width: 2;
  line-color:red;
  line-opacity: 1;
}
#layer::2 {
  polygon-fill: #374c70;
  polygon-opacity: 0;
  line-width: 2;
  line-color: blue;
  line-opacity: 1;
  line-offset:-3;
}

Current Result

red lines: actual polygon border blue lines: polygon border with offset

  • If offset is < 0: the tiles that intersect my polygon has visible borders inside the polygon image

  • If offset = 0: Behavior as expected image

  • if offset > 0: the tiles that intersect my polygon has visible borders outside the polygon image

Expected result

Just no tiles borders 😃

Browser and version

Any

.carto file

test_offset.carto.zip

Additional info

Please add any information of interest here below

Issue Analytics

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

github_iconTop GitHub Comments

14reactions
Algunenanocommented, Apr 15, 2019

Yeah, it’s not related to #14124. I’m keeping this open until the fix is released and installed in production.

Well, it’s only taken me ~13~ 15 months but it’s now in production.

1reaction
rafatowercommented, May 11, 2018

Indeed my intuition was correct, reverting that change fixes the bug:

  • mapnik v3.0.15-carto branch:

image

  • mapnik revert_offset_converter_fix branch:

image

(the slight change in style is just to avoid caching between tests)

but it breaks other things (see the polygon vertex and the many visual tests broken).

Fixing this would require some c++ & mapnik expertise, finesse keeping the good parts and amending the bad ones, and some extra test for it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display tile grid borders with leaflet (visual debugging)
Leaflet tiles have the leaflet-tile class You can use css to make the border visible .leaflet-tile { border: solid black 5px; }.
Read more >
Tiles' borders got visible in my AGOL Tile Service...
Solved: I found out that my Tile Services now show up with a thin whitish border around, so that it seems a grid...
Read more >
Layers | Style Specification | Mapbox GL JS
A style's layers property lists all the layers available in that style. The type of layer is specified by the "type" property, and...
Read more >
Leaflet tile lines visible - Stack Overflow
I notice that at certain zoom levels, both in the map itself and zoom levels for the browser, I see the outline of...
Read more >
thin lines appearing at the border of tiles but are not in the image
It could be two things. Filtering or sub-pixels. When you use any image or sprite, unless it is displayed at pefect native resolution...
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