mapbox-gl-js create a sectoraround a lat/lng?

75 views Asked by At

I need to create a sector around a point where a user clicks. How would I do this?

I can create a layer of type "circle" for displaying the data as circles but how to get sector

1

There are 1 answers

0
Bwyss On

You will need to create a map.on('click') event: https://www.mapbox.com/mapbox-gl-js/api/#map.event:click

E.g.

map.on('click', function (e) {
    ...
});