Programmatically offset symbols and polygons using mapbox gl js

621 Views Asked by At

How do i offset my overlapping symbol layers and polygons placed at same coordinates and same style, one beside another any help would be appriciated. you can see lines with offset one beside another

here is the line offset code

1

There are 1 best solutions below

1
On

You can offset symbol layers with text-offset or icon-offset.

If you're drawing a polygon with a line layer, you can use line-offset as you have used. If it's a fill, I'm not sure what you want to happen. There's no obvious meaning of a fill "offset".