Mapbox Component Polygon Outline Add Layer

HI all,

I am trying to add an outline to a mapbox polygon as it is exceedingly small “polyline doubled back on itself” i have added the following code to helpers.js file but to no avail.

map.addLayer(
id: ‘outline’,
type: ‘line’,
source: id,
layout: {},
paint: {
‘line-color’: color,
‘line-width’: 3,
},
});

As always any assistance is appreciated.

Kind Regards,
Raymond

Hi, @Raymond_Woodley

This code will not work, we can update Mapbox, where you can optionally add an outline to your polygon data or give a code, which will be faster.

Also, if you add this code 'fill-outline-color': '#000', after line 242 in helpers.js, it will add an outline. But changing the width is not available.

Hi @Roman_Skrypak

Thank you that would be absolutely great would really appreciate that.

Kind Regards,
Raymond

Hi, @Raymond_Woodley

The Mapbox component is updated, added the polygon outline.

Kind Regards,
Bohdan