-
Notifications
You must be signed in to change notification settings - Fork 1.3k
be more strict about line symbols that cross tile edges #3582
Comments
This is specific to |
Unfortunately it isn't possible to place shields in the same location in both tiles using our vectortiles. The point positions for line labels are calculated by finding the points every __px along the line. Since the same line could be clipped differently in both tiles, it is pretty likely that these calculated points won't be the same in both tiles. I think in mapnik maps we just avoid placing any line labels that cross boundaries. In the equivalent mapnik map the vertical stretch of 395 would have no shields, right @yhahn? other ideas for fixing this: A) If the vectortiles contained the length of the line that was clipped off of the beginning of the line, then that could be used to make the placement the same in both tiles. But that seems like a pretty huge thing to ask from the vectortiles. B) It might be possible to fix this by changing how we turn lines into points. If we found all the points the line intersects with a tile edge and then started calculating point positions by moving in both directions then the positions would be the same. I think we'd need a larger data buffer for the road label vectortile layers though. I haven't thought carefully about this approach, but I think there would still be some broken cases. C) Converting lines -> points before creating vector tiles for any critical layers like highway shields. |
We rely on the style creator to make this decision, but it's really always the right decision given the limitations above. All your FutureIdeas make sense but I think as a stopgap/triage/intermediate phase this approach would be 👍 |
👍 Thanks for the additional details. I understand enough to agree with your and @yhahn's assessment now. |
ref #3582 if `symbol-avoid-edges` is true, this prevents symbols from colliding with tile edges.
ref #3582 if `symbol-avoid-edges` is true, this prevents symbols from colliding with tile edges.
The 395 shields are clipped:
We should check if line symbols cross tile boundaries, and if they do, prevent them from being rendered.
The text was updated successfully, but these errors were encountered: