Closed farfromrefug closed 2 years ago
Ok, I will try to answer them one by one:
text-min-distance
, I will look into this.text-wrap-character
, I think it should be supported, will look into thisline-geometry-transform
, scaling works based on local tile coordinates, so the behavior you are describing seems right.line-offset
, I just added support for this. This has been requested before and can be used to create various effects, so this is supported nowline-pattern-file
stretching. This has been discussed before, distortion is caused due to keeping line width constant while line stretches when zoomed along the line direction. It would be possible to keep the pattern non-stretched but then zooming causes ugly 'pattern running' artifact which looks very bad to me.@mtehver thanks for your answers i remember now about line-pattern-file
. I understand what you say. I am just thinking something is wrong as mapbox manage to render them a bit better. By better i mean the "details" are not as "scaled" as in carto. In my screenshot above you can see that we see like a blurred "circle" when the pattern was actually showing a triangle shape. On Mapbox we still see the shape
@mtehver just tested your latest changes, pretty awesome!!! still a weird behavior with text-wrap-width
as you can see in the video it seems to not always wrap at the same "place".
I use this:
text-wrap-character: '-';
text-wrap-width:step([view::zoom], (9, 100), (15, 180));
text-wrap-before:true;
https://user-images.githubusercontent.com/655344/130239718-5e082e5d-297e-40f5-9c39-b6d334491092.mp4
EDIT: i know why! always thought wrap width was in chars length, it is in pixels! makes sense now
Time to show the progress. It is going really well in copying Mapbox style.
And this is my osm variant. Just a variant of the same style.
Your styles look great! Any chance of making them publicly available in github?
@mtehver yes i was actually hoping you would ask for this :D Let me clean it up a bit and i ll create a repo just for it.
@mtehver here you go https://github.com/farfromrefug/new_carto_theme
@mtehver it seems there is an issue with line-offset
. I dont see it with 'cliffs' when i use it but with this code it draws the "offset" line twice, one on each side
Another side effect of line-offset
, on certain zooms i see unwanted lines (same code)
@farfromrefug What type of geometry do you use with offsetted lines? In case of polygons, this could happen at tile borders if you offset lines 'inwards'. The reason is that polygons are clipped at tile boundaries (with a small extra buffer usually) and when you shift the lines inwards, this clipping becomes visible. Thus this is an artifact of tiling and can not be really fixed (other than increasing the buffer size).
@mtehver it makes sense and yes those are polygons (parks). I ll see what i can do on my side
I ll sum up a few issues i am seing here: *text-min-distance: does not seem to do anything . i have tried with very high values (like with places labels) and nothing changes. Is there a special case? What is the unit for it?
line-geometry-transform
: 'scale' behave weirdly.i was think that with something likescale(1.1, 1.1)
i could create some kind of a halo effect but it moves the whole line in totally different places. What is the anchor point for scale? translate seems to be good though.text-wrap-character
: i know we dont have that prop yet. No real issue just could we have wrap on-
i have a lot of rendering issues because of this. In France we have a lot of long names with no spaces and only-
line-offset
? this would allow very nice feature rendering like cliffs or park "frontiers" (like "inside" line of a polygon)line-pattern-file
: kind of render weirdly. The image seems "overly" scaled as shown in the screenshot.