Change state of mapbox map upon loading

Viewed 30

I'm working on a web app with Mapbox and I want to change the state of a created polygon to be selected without clicking upon loading.

I appreciate any help!

draw.add({
'id': 'polygon',
'type': 'Feature',
'properties': {},
'geometry': {
    'type': 'Polygon',
    'coordinates': [coordinates],
}

});

Current state Current state

Desired state Desired state

1 Answers
Related